GHSA-VCX7-PFRH-MCFG
Vulnerability from github – Published: 2026-11-20 14:55 – Updated: 2026-11-20 14:55Summary
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//components/" \ -H "Authorization: " \ -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 \ --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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.7.0"
},
"package": {
"ecosystem": "npm",
"name": "storyblok-backup"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.7.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-115565"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-20T14:55:18Z",
"nvd_published_at": "2026-11-19T19:17:18Z",
"severity": "MODERATE"
},
"details": "### Summary\nstoryblok-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.\n\n### Details\nThe 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.\n\nFor the components resource type specifically, the file name used is the component\u0027s own name field, which is free text and editable by anyone with component management access in the Storyblok CMS.\n\nOther 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.\n\nSince 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.\n\n### PoC\n\n**Step 1 \u2014 plant the malicious component name via Storyblok\u0027s Management API:**\n\ncurl -X POST \"https://mapi.storyblok.com/v1/spaces/\u003cSPACE_ID\u003e/components/\" \\\n -H \"Authorization: \u003cMANAGEMENT_API_TOKEN\u003e\" \\\n -H \"Content-Type: application/json\" \\\n -d \u0027{\n \"component\": {\n \"name\": \"../../../../tmp/evil-storyblok-backup\",\n \"schema\": {}\n }\n }\u0027\n\nAny 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.\n\n**Step 2 \u2014 run storyblok-backup against this space, exactly as a normal user would:**\n\nnpx storyblok-backup \\\n --space \u003cSPACE_ID\u003e \\\n --token \u003cMANAGEMENT_API_TOKEN\u003e \\\n --path ./backup \\\n --types \"components\"\n\n**Step 3 \u2014 observe the actual file write location:**\n\nWith the malicious component name above, the tool\u0027s writeJson() function builds the output path as:\n\n backupDir + \"/components\" + \"/../../../../tmp/evil-storyblok-backup\" + \".json\"\n\nwhich resolves outside ./backup entirely. Confirm with:\n\n ls -la /tmp/evil-storyblok-backup.json\n\nThe file exists there, outside the --path ./backup directory that was configured, containing the full JSON definition of the malicious component.\n\n**Step 4 \u2014 for comparison, confirm assets and stories are NOT affected:**\n\nThe same defaultFetch() pattern is used for stories and datasources (fileField: numeric id) and for assets (fileField derived via \n.split(\u0027/\u0027).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.\n\n### Impact\nAnyone 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.\n\nSuggested 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.",
"id": "GHSA-vcx7-pfrh-mcfg",
"modified": "2026-11-20T14:55:18Z",
"published": "2026-11-20T14:55:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/webflorist/storyblok-backup/security/advisories/GHSA-vcx7-pfrh-mcfg"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115565"
},
{
"type": "WEB",
"url": "https://github.com/webflorist/storyblok-backup/commit/f4e4bb1979832abd7e4eb1666e2b3cfc767f587a"
},
{
"type": "PACKAGE",
"url": "https://github.com/webflorist/storyblok-backup"
},
{
"type": "WEB",
"url": "https://github.com/webflorist/storyblok-backup/releases/tag/v0.7.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "storyblok-backup: Stored path traversal via unsanitized Storyblok component names in backup output"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.