
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-61632 is a path traversal vulnerability in the pymdownx.b64 extension of PyMdown Extensions, a set of extensions for the Python-Markdown project. The flaw allows an attacker who controls Markdown content to read arbitrary files outside the configured base_path by crafting <img src> tags with ../ sequences or absolute paths. It affects all versions up to and including 10.21.3 and was fixed in version 11.0. The vulnerability was published on July 10, 2026, and carries a CVSS v3.1 base score of 5.3 (Medium) (Github Advisory, Red Hat Bugzilla).
The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). In pymdownx/b64.py, the repl_path function resolves image src attributes by joining them onto base_path using os.path.normpath, then opens the resulting file directly — with no check that the resolved path remains within base_path. For absolute src values, base_path is bypassed entirely via os.path.normpath(path). The file is read and its contents are base64-encoded into the rendered HTML output, disclosing them to anyone who views the page. Exploitation requires no authentication or user interaction, and a public proof-of-concept script was included in the advisory (Github Advisory).
Successful exploitation results in information disclosure: an attacker who can submit untrusted Markdown to an application rendering it with pymdownx.b64 enabled can exfiltrate the contents of any file readable by the server process, provided the file has an allowed image extension (.png, .jpg, .jpeg, .gif, .svg). While the extension check limits the scope to image-extension files, sensitive data stored in such files (e.g., configuration files renamed or disguised with image extensions, or actual image assets containing embedded metadata) can be leaked. There is no integrity or availability impact, but the confidentiality risk is real in multi-tenant or user-generated-content platforms (Github Advisory, Red Hat Bugzilla).
A proof-of-concept script was publicly disclosed as part of the GitHub Security Advisory, confirmed against pymdown-extensions 10.21.3 from PyPI. The vulnerability is network-exploitable with no privileges required and no user interaction needed, making it automatable. The EPSS score is approximately 0.40% (34th percentile), indicating a relatively low but non-negligible probability of exploitation in the wild. NVD SSVC data classifies exploitation status as "poc" and automatable as "yes." There is no current evidence of active in-the-wild exploitation or CISA KEV catalog listing (Github Advisory, Feedly).
pymdownx.b64 extension enabled.<img> tag with a src attribute containing path traversal sequences or an absolute path pointing to a target file with an image extension, e.g., <img src="../../../etc/passwd.png"> or <img src="/var/app/data/secret.png">.pymdownx.b64 extension will have read the target file, base64-encoded its contents, and embedded them as a data URI in the <img src> attribute.<img src="data:image/...;base64,..."> tag and decode it to recover the file's contents (Github Advisory).<img src> tags with ../ sequences or absolute paths in the src attribute; responses containing unusually large base64-encoded data URIs in <img> tags...%2F, ../, or absolute paths) in request bodies targeting Markdown rendering endpoints..png, .jpg, .jpeg, .gif, or .svg extensions located outside the configured base_path directory, initiated by the Python/Markdown rendering process.base_path directory, particularly files with image extensions in sensitive directories (Github Advisory).Upgrade to PyMdown Extensions version 11.0 or later, which introduces path containment checks using os.path.realpath and rejects any resolved path outside base_path. Version 11.0 also adds a new restrict_path option (default: True) and a root_path configuration parameter for more flexible path restriction (Release 11.0). As an immediate workaround for applications that cannot upgrade, disable the pymdownx.b64 extension entirely when rendering untrusted Markdown. Additionally, ensure the process rendering Markdown runs with the least privilege necessary to limit the scope of any file reads.
Red Hat tracked the vulnerability via Bugzilla (Bug 2512227) and assigned it medium priority and severity, with multiple product security team members added to the CC list, indicating active triage across Red Hat products that may bundle PyMdown Extensions (Red Hat Bugzilla). The vulnerability was credited to reporter aqilFauzi121 in the GitHub Security Advisory. Tenable added detection support via Nessus plugin 333365 and a container security plugin shortly after disclosure (Github Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."