CVE-2025-11058: Xml2rfc Xml2rfc Has An Arbitrary File Vulnerability

HIGH
Advisory Identifier: GHSA-cfmv-h8fx-85m7
CWE-22
Published
Advisory Summary

CVE-2025-11058 is a HIGH xml2rfc has an arbitrary file vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Xml2rfc libraries in the PyPI ecosystem. The issue involves xml2rfc has an arbitrary file read vulnerability. Remediation is available by upgrading affected packages to version 3.30.1.

CVE-2025-11058 at a Glance

CVE Identifier CVE-2025-11058
GHSA Identifier GHSA-cfmv-h8fx-85m7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Xml2rfc
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-11058

To remediate this vulnerability, upgrade all affected Xml2rfc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

xml2rfc fixed: 3.30.1
pip install xml2rfc>=3.30.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show xml2rfc

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-11058, inspect your installed packages using pip:

pip show xml2rfc

Analyze the terminal output to locate any version of Xml2rfc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.30.1), your application is affected.

Note: The pip show xml2rfc command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Xml2rfc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact When generating PDF files, this vulnerability allows an attacker to read arbitrary files from the filesystem by injecting malicious link element into the XML. ### Workarounds Test untrusted input with `link` elements with `rel="attachment"` before processing. ### Credits This vulnerability was reported by Mohamed Ouad from [Doyensec](https://doyensec.com/).

CVE-2025-11058 Affected Xml2rfc Versions

1 component(s)
Fixed Versions:
3.30.1
Product / Package Ecosystem Affected Versions Fixed Version
xml2rfc
PyPI
< 3.30.1
3.30.1

References

Frequently Asked Questions

What is CVE-2025-11058?
CVE-2025-11058 is a security vulnerability in Xml2rfc involving xml2rfc has an arbitrary file read vulnerability under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Xml2rfc versions are affected?
Affected versions include releases prior to 3.30.1 across affected packages: xml2rfc.
What version fixes CVE-2025-11058?
Upgrading to 3.30.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xml2rfc affected?
Yes, xml2rfc is affected in releases prior to 3.30.1. Upgrade your dependency to 3.30.1 or later.
What CWE is associated with CVE-2025-11058?
CVE-2025-11058 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2025-11058?
Run the dependency tree command: 'pip show xml2rfc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cfmv-h8fx-85m7",
  "modified" : "2025-09-29T14:03:20Z",
  "published" : "2025-08-26T17:45:11Z",
  "aliases" : [ "CVE-2025-11058" ],
  "summary" : "xml2rfc has an arbitrary file read vulnerability",
  "details" : "### Impact\nWhen generating PDF files, this vulnerability allows an attacker to read arbitrary files from the filesystem by injecting malicious link element into the XML.\n\n### Workarounds\nTest untrusted input with `link` elements with `rel=\"attachment\"` before processing.\n\n### Credits\nThis vulnerability was reported by Mohamed Ouad from [Doyensec](https://doyensec.com/).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "xml2rfc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.30.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.30.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ietf-tools/xml2rfc/security/advisories/GHSA-cfmv-h8fx-85m7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ietf-tools/xml2rfc/commit/f2b245bc0aeeac0667c8f74e976c466c5991f0e4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ietf-tools/xml2rfc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-26T17:45:11Z",
    "nvd_published_at" : null
  }
}