{"answers":{"affected":"3 open source packages ship an affected version, including gramps-webapi.","exploited":"There is no known exploitation of CVE-2026-40258 in the wild and no public exploit code.","fix":"Upgrade gramps-webapi to 3.11.1 or later.","what":"CVE-2026-40258 is a critical path traversal vulnerability in gramps-project gramps-web-api, published on 17 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40258 and fix it if it is affected.\n\nWhat it is: CVE-2026-40258 is a critical path traversal vulnerability in gramps-project gramps-web-api, published on 17 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-40258 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- gramps-webapi (PyPI): affected from 1.6.0; fixed in 3.11.1\n- gramps-webapi (PyPI): affected from 1.6.0; fixed in 3.11.1\n- gramps-webapi (PyPI): affected from 1.6.0; fixed in 3.11.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40258/ (Markdown: https://insights.sbomify.com/CVE-2026-40258/index.md)","id":"CVE-2026-40258","markdown":"https://insights.sbomify.com/CVE-2026-40258/index.md","name":"CVE-2026-40258","record":{"aliases":["GHSA-m5gr-86j6-99jp","PYSEC-2026-346"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Gramps Web API","requires_auth":"high_privilege","summary":"Authenticated owners can exploit Zip Slip in media import to write arbitrary files outside the intended directory, requiring an upgrade to fix.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"The Gramps Web API is a Python REST API for the genealogical research software Gramps. Versions 1.6.0 through 3.11.0 have a path traversal vulnerability (Zip Slip) in the media archive import feature. An authenticated user with owner-level privileges can craft a malicious ZIP file with directory-traversal filenames to write arbitrary files outside the intended temporary extraction directory on the server's local filesystem. Startig in version 3.11.1, ZIP entry names are now validated against the resolved real path of the temporary directory before extraction. Any entry whose resolved path falls outside the temporary directory raises an error and aborts the import.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Gramps Web API has Zip Slip Path Traversal in Media Archive Import","id":"CVE-2026-40258","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"SiYuan: Publish Reader Can Arbitrarily Delete Attribute View Files via removeUnusedAttributeView API","id":"CVE-2026-40259"},"packages":[{"ecosystem":"PyPI","fixed":["3.11.1"],"introduced":["1.6.0"],"last_affected":[],"package":"gramps-webapi","purl":null,"source":"GHSA-m5gr-86j6-99jp"},{"ecosystem":"PyPI","fixed":["3.11.1"],"introduced":["1.6.0"],"last_affected":[],"package":"gramps-webapi","purl":"pkg:pypi/gramps-webapi","source":"GHSA-m5gr-86j6-99jp"},{"ecosystem":"PyPI","fixed":["3.11.1"],"introduced":["1.6.0"],"last_affected":[],"package":"gramps-webapi","purl":"pkg:pypi/gramps-webapi","source":"PYSEC-2026-346"}],"prev":{"headline":"OP-TEE has SHA-3 accelerated finalize heap overflow","id":"CVE-2026-40257"},"products":["gramps-web-api"],"published":"2026-04-17","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-20","vendors":["gramps-project"]},"summary":"Authenticated owners can exploit Zip Slip in media import to write arbitrary files outside the intended directory, requiring an upgrade to fix.","url":"https://insights.sbomify.com/CVE-2026-40258/"}