Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI

GHSA-432c-wxpg-m4q3

xml2rfc has file inclusion irregularities

Published
Feb 7, 2025
Updated
Feb 7, 2025
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

1 pkg affected
🐍xml2rfc

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Version 3.12.0 changed xml2rfc so that it would not access local files without the presence of its new --allow-local-file-access flag. This prevented XML External Entity (XXE) injection attacks with xinclude and XML entity references.

It 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.

The xml2rfc <= 3.26.0 behaviour:

xincludeXML entity referenceartwork src=sourcecode src=
without --allow-local-file-access flagNo filesystem accessAny file in xml2rfc templates dir and below, any file in source directory and belowAccess source directory and belowAccess source directory and below
with --allow-local-file-access flagAccess any file on filesystem1Access any file on filesystem1Access source directory and belowAccess source directory and below

Impact

Anyone running xml2rfc as a service that accepts input from external users is impacted by this issue. Specifying a file in src attribute in artwork or sourcecode elements will cause the contents of that file to appear in xml2rfc’s output results. But that file has to be inside the same directory as the XML input source file. For artwork and sourcecode, xml2rfc will not look above the source file directory.

The proposed new behaviour

  • Generalize file access checks.
  • Only allow access to files within src dir and below. (xml entity include can access templates dir).
  • Always allow access to templates_dir for XML entity includes.

New behaviour:

xincludeXML entity referenceartwork src=sourcecode src=
without --allow-local-file-access flagNo filesystem accessNo filesystem access (except for templates_dir)No filesystem accessNo filesystem access
with --allow-local-file-access flagAccess source directory and belowAccess source directory and below (Can accesstemplates_dir).Access source directory and belowAccess source directory and below

Workarounds

Use a secure temporary directory to process un-trusted XML files, and do not reuse it for processing other XML documents.

Footnotes

  1. Access any file of the filesystem with the permissions of the user running xml2rfc can access. 2

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIxml2rfc3.12.0&&< 3.27.03.27.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for xml2rfc. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update xml2rfc to 3.27.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-432c-wxpg-m4q3 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-432c-wxpg-m4q3 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-432c-wxpg-m4q3. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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. This prevented XML External Entity (XXE) injection attacks with `xinclude` and XML entity references. It 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-loca
O3 Security · Impact-Aware SCA

Is GHSA-432c-wxpg-m4q3 in your dependencies?

O3 detects GHSA-432c-wxpg-m4q3 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.