MEDIUM · CVSS 3.1 5.7 EPSS 0.4% · 30th percentile CWE-22

CVE-2026-115565: storyblok-backup: Stored path traversal via unsanitized Storyblok component names in backup output

Published 2026-11-20 · Updated 2026-11-20 · Also known as GHSA-vcx7-pfrh-mcfg

Summary

A stored path traversal vulnerability in storyblok-backup allows unsanitized Storyblok component names to dictate file output paths during the backup process. Developers and administrators running backups of Storyblok spaces should update to the patched version.

Who is affected

Deployments running the storyblok-backup tool are vulnerable when backing up a Storyblok space containing a maliciously crafted component name. An attacker with component management access can force the backup tool to write arbitrary JSON files outside the intended backup directory on the host filesystem, potentially overwriting existing files depending on user permissions.

Exploitability

The vulnerability has a CVSS base score of 5.7 (MEDIUM) with a vector of CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N, indicating network accessibility, low privileges required for planting the payload, and user interaction (running the backup). It has an EPSS score of 0.004 (percentile 0.305) and is not listed in the CISA KEV catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-20. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm storyblok-backup >= 0, < 0.7.1 0.7.1 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredLow
User interactionRequired
ScopeUnchanged
ConfidentialityNone
IntegrityHigh
AvailabilityNone

FAQ

What causes the path traversal vulnerability in storyblok-backup?

The vulnerability is caused by the writeJson function concatenating the backup directory, folder, and the unsanitized name field of a Storyblok component directly into a file path without sanitization or containment checks.

Are other resource types like stories or assets affected?

No. Stories and datasources use numeric IDs as filenames, and assets derive filenames by splitting on the slash character to strip path separators. The issue is scoped specifically to components.

What level of access is required to exploit this issue?

An attacker needs component management access within the source Storyblok space to create or rename a component with malicious path traversal sequences. No server access to the machine running the backup is required.

Original advisory description
### Summary storyblok-backup writes files using unsanitized names for Storyblok components, which are content type or schema definitions. This allows a component name containing path traversal sequences to cause backup files to be written outside the intended backup directory. Anyone with component management access in the source Storyblok space, not server access, can plant a malicious component name that causes arbitrary file writes on the machine of anyone who later runs a backup against that space. ### Details The writeJson function, which takes a folder, a file name, and content, builds the output file path by directly concatenating the backup directory, the folder, and the file name as strings, with no path sanitization or containment check. For the components resource type specifically, the file name used is the component's own name field, which is free text and editable by anyone with component management access in the Storyblok CMS. Other resource types are not affected by this same issue. Stories and datasources use their numeric IDs as filenames, and assets have their filename derived by splitting on the slash character and taking the last segment, which strips path separators. This issue is scoped specifically to components. Since the component name is stored in Storyblok and only read back later when the backup tool runs, this is a stored, second order vulnerability. The malicious value is planted once, then triggers on every subsequent backup run performed by anyone using this tool against that Storyblok space. ### PoC **Step 1 - plant the malicious component name via Storyblok's Management API:** curl -X POST "https://mapi.storyblok.com/v1/spaces/<SPACE_ID>/components/" \ -H "Authorization: <MANAGEMENT_API_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "component": { "name": "../../../../tmp/evil-storyblok-backup", "schema": {} } }' Any Storyblok user with component-management permission in the space (not server access to wherever backups run) can do this through the Storyblok UI just as easily, by naming a new component with this value in the component name field. **Step 2 - run storyblok-backup against this space, exactly as a normal user would:** npx storyblok-backup \ --space <SPACE_ID> \ --token <MANAGEMENT_API_TOKEN> \ --path ./backup \ --types "components" **Step 3 - observe the actual file write location:** With the malicious component name above, the tool's writeJson() function builds the output path as: backupDir + "/components" + "/../../../../tmp/evil-storyblok-backup" + ".json" which resolves outside ./backup entirely. Confirm with: ls -la /tmp/evil-storyblok-backup.json The file exists there, outside the --path ./backup directory that was configured, containing the full JSON definition of the malicious component. **Step 4 - for comparison, confirm assets and stories are NOT affected:** The same defaultFetch() pattern is used for stories and datasources (fileField: numeric id) and for assets (fileField derived via .split('/').at(-1), which strips any path separators from the value before it reaches writeJson()). Only the components resource type passes a raw, unsanitized user-editable string directly into the file path. ### Impact Anyone with the ability to create or rename a component in the source Storyblok space, which is a content management privilege and not server access, can cause the backup tool, when run by someone else, to write files outside the intended backup directory on whatever machine runs the backup. Depending on the path chosen and the permissions of the process running the backup, this could overwrite existing files at attacker chosen locations on the host filesystem. Suggested fix: sanitize the component name before using it as a filename, for example by applying the same last-path-segment treatment already used for assets, or by resolving the final path and verifying it stays within the intended backup directory before writing.

References

Source records: GHSA-vcx7-pfrh-mcfg (OSV.dev) · EPSS by FIRST, 2026-11-21.