CVE-2025-11059
Python vulnerability analysis and mitigation

Overview

CVE-2025-11059 is an arbitrary file read vulnerability in the xml2rfc Python package (pip) that allows attackers to read arbitrary files from the filesystem by injecting a malicious link element into prepped RFCXML files during PDF generation. It affects all versions up to and including 3.30.1, with version 3.30.2 containing the fix. The vulnerability was published on September 9, 2025, by maintainer kesara via a GitHub Security Advisory. It carries a CVSS v4 base score of 8.7 (High) per the GitHub Advisory Database, though the original security advisory classifies it as Critical (GitHub Advisory, xml2rfc Advisory).

Technical details

The root cause is improper limitation of a pathname to a restricted directory (CWE-22, Path Traversal). When xml2rfc processes a prepped RFCXML file to generate a PDF, it does not sanitize <link> elements with rel="attachment" before parsing, allowing an attacker-controlled file path to resolve outside the intended directory and read arbitrary filesystem files. The fix, introduced in commit 73fb1c9, adds a sanitize() method to the parser that strips link attachments from the document tree before further processing, and moves this sanitization step to occur after XML validation but before any output generation (GitHub Commit, GitHub Advisory). This vulnerability is related to a prior advisory GHSA-cfmv-h8fx-85m7, suggesting a pattern of similar file-read issues in the tool (xml2rfc Advisory).

Impact

Successful exploitation results in a high confidentiality impact — an attacker can read arbitrary files accessible to the process running xml2rfc, such as configuration files, credentials, private keys, or other sensitive data on the host filesystem. There is no integrity or availability impact. The attack vector is network-accessible (CVSS AV:N), requires no privileges, no user interaction, and no special attack conditions, making it exploitable by any party who can supply a malicious prepped RFCXML file to a system running a vulnerable version of xml2rfc (GitHub Advisory).

Exploitation steps

  1. Identify target: Locate a system or service that accepts prepped RFCXML files and processes them with xml2rfc version ≤ 3.30.1 to generate PDF output.
  2. Craft malicious RFCXML: Create a prepped RFCXML document containing a <link> element with rel="attachment" whose href attribute points to a target file on the server filesystem (e.g., href="/etc/passwd" or href="../../sensitive_config.ini").
  3. Submit the file: Supply the crafted RFCXML to the vulnerable xml2rfc processing pipeline — for example, by uploading it to a document conversion service or passing it as input to an automated RFC toolchain.
  4. Retrieve file contents: When xml2rfc generates the PDF, the malicious link attachment causes the tool to read and embed the targeted file's contents, which the attacker can then extract from the generated PDF output (GitHub Advisory, xml2rfc Advisory).

Indicators of compromise

  • File System: Unexpected or anomalous PDF output files containing content from sensitive system files (e.g., /etc/passwd, private key material, configuration files).
  • Logs: Application or process logs showing xml2rfc accessing files outside the expected working directory or document root during PDF generation.
  • Process: xml2rfc process opening file descriptors to sensitive paths (e.g., /etc/, ~/.ssh/, application config directories) detectable via auditd or strace monitoring.
  • Network: Inbound submissions of RFCXML files containing <link rel="attachment"> elements with filesystem paths rather than standard URLs, visible in web application or API request logs.

Mitigation and workarounds

Upgrade xml2rfc to version 3.30.2 or later, which introduces a sanitization step that strips malicious link attachment elements before document processing (xml2rfc Release). As a temporary workaround for environments that cannot immediately upgrade, validate and reject any untrusted input RFCXML files containing <link> elements with rel="attachment" before passing them to xml2rfc (xml2rfc Advisory). Additionally, restrict the filesystem permissions of the user account running xml2rfc to limit the scope of files that could be read if exploitation occurs.

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-50271HIGH7.5
  • Python logoPython
  • ddtrace
NoYesJul 17, 2026
CVE-2026-54559MEDIUM6.9
  • Python logoPython
  • pocketsphinx
NoYesJul 17, 2026
GHSA-mfr4-mq8w-vmg6MEDIUM6.6
  • Python logoPython
  • proot-distro
NoYesJul 17, 2026
CVE-2026-47144MEDIUM5.5
  • JavaScript logoJavaScript
  • shamefile
NoYesJul 20, 2026
CVE-2026-46715MEDIUM5.3
  • Python logoPython
  • flask-security-too
NoYesJul 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management