{"answers":{"affected":"2 open source packages ship an affected version, including xml2rfc.","exploited":"There is no known exploitation of GHSA-432c-wxpg-m4q3 in the wild and no public exploit code.","fix":"Upgrade xml2rfc to 3.27.0 or later.","what":"GHSA-432c-wxpg-m4q3 is a path traversal vulnerability in xml2rfc, published on 7 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-432c-wxpg-m4q3 and fix it if it is affected.\n\nWhat it is: GHSA-432c-wxpg-m4q3 is a path traversal vulnerability in xml2rfc, published on 7 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-432c-wxpg-m4q3 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- xml2rfc (PyPI): affected from 3.12.0; fixed in 3.27.0\n- xml2rfc (PyPI): affected from 3.12.0; fixed in 3.27.0\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/GHSA-432c-wxpg-m4q3/ (Markdown: https://insights.sbomify.com/GHSA-432c-wxpg-m4q3/index.md)","id":"GHSA-432c-wxpg-m4q3","markdown":"https://insights.sbomify.com/GHSA-432c-wxpg-m4q3/index.md","name":"GHSA-432c-wxpg-m4q3","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Python XML tool","requires_auth":"none","summary":"Attackers can read arbitrary files within the source directory via artwork or sourcecode elements, bypassing local file access restrictions.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Version [3.12.0](https://github.com/ietf-tools/xml2rfc/blob/main/CHANGELOG.md#3120---2021-12-08) changed `xml2rfc` so that it would not access local files without the presence of its new `--allow-local-file-access` flag.\nThis prevented XML External Entity (XXE) injection attacks with `xinclude` and XML entity references.\n\nIt was discovered that `xml2rfc` does not respect `--allow-local-file-access` when a local file is specified as `src` in `artwork` or `sourcecode` elements. Furthermore, XML entity references can include any file inside the source dir and below without using the `--allow-local-file-access` flag. \n\nThe `xml2rfc \u003c= 3.26.0` behaviour:\n\n|  | `xinclude` | XML entity reference | `artwork src=` | `sourcecode src=` |\n|---|---|---|---|---|\n| without `--allow-local-file-access` flag | No filesystem access | Any file in xml2rfc templates dir and below, any file in source directory and below | Access source directory and below | Access source directory and below |\n| with `--allow-local-file-access` flag | Access any file on filesystem[^1] | Access any file on filesystem[^1] | Access source directory and below | Access source directory and below | Access source directory and below |\n\n  [^1]: Access any file of the filesystem with the permissions of the user running `xml2rfc` can access.\n\n### Impact\n\nAnyone running `xml2rfc` as a service that accepts input from external users is impacted by this issue.\nSpecifying a file in `src` attribute in `artwork` or `sourcecode` elements will cause the contents of that file to appear in xml2rfc’s output results.\nBut that file has to be inside the same directory as the XML input source file.\nFor `artwork` and `sourcecode`, `xml2rfc` will not look above the source file directory.\n\n### The proposed new behaviour\n- Generalize file access checks.\n- Only allow access to files within src dir and below. (xml entity include can access templates dir).\n- Always allow access to `templates_dir` for XML entity includes.\n\nNew behaviour:\n\n|  | `xinclude` | XML entity reference | `artwork src=` | `sourcecode src=` |\n|---|---|---|---|---|\n| without `--allow-local-file-access` flag | No filesystem access | No filesystem access _(except for `templates_dir`)_ | No filesystem access | No filesystem access |\n| with `--allow-local-file-access` flag | Access source directory and below | Access source directory and below _(Can access`templates_dir`)._ | Access source directory and below | Access source directory and below |\n\n### Workarounds\n\nUse a secure temporary directory to process un-trusted XML files, and do not reuse it for processing other XML documents.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"xml2rfc has file inclusion irregularities","id":"GHSA-432c-wxpg-m4q3","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["3.27.0"],"introduced":["3.12.0"],"last_affected":[],"package":"xml2rfc","purl":null,"source":"GHSA-432c-wxpg-m4q3"},{"ecosystem":"PyPI","fixed":["3.27.0"],"introduced":["3.12.0"],"last_affected":[],"package":"xml2rfc","purl":"pkg:pypi/xml2rfc","source":"GHSA-432c-wxpg-m4q3"}],"products":null,"published":"2025-02-07","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can read arbitrary files within the source directory via artwork or sourcecode elements, bypassing local file access restrictions.","url":"https://insights.sbomify.com/GHSA-432c-wxpg-m4q3/"}