python-pymdown-extensions security update
Extension pack for Python Markdown. Security Fix(es): PyMdown Extensions is a set of extensions for the Python-Markdown markdown project. From 10.0.1 until 10.21.3, pymdownx.snippets uses a string-prefix containment check in SnippetPreprocessor.get_snippet_path() in pymdownx/snippets.py when `restrict_base_path: True`, allowing markdown snippet directives to read files from sibling paths that share the same base_path prefix, such as docs and docs_internal. This is a regression of CVE-2023-32309. This issue is fixed in version 10.21.3.(CVE-2026-46338) PyMdown Extensions is a set of extensions for the Python-Markdown markdown project. In versions up to and including 10.21.3, the b64 extension is vulnerable to a path traversal that discloses arbitrary files: it inlines images referenced by <img src="..."> by joining the src onto the configured base_path with os.path.normpath and opening the result directly, without verifying that the resolved path stays inside base_path. As a result, an src containing ../ sequences or an absolute path reads a file outside base_path as long as it has an allowed image extension (.png, .jpg, .jpeg, .gif, .svg), and the file's contents are then base64-encoded into the rendered output, disclosing them. An application that renders untrusted Markdown with pymdownx.b64 enabled can therefore leak the contents of image-extension files readable by the process to whoever controls the Markdown or views the output, a targeted file-read bounded by the extensio
OESA-2026-4182
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:OESA-2026-4182
python-pymdown-extensions
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 10.7-3.oe2403sp4
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "10.7-3.oe2403sp4"
}
]
}
],
"package": {
"name": "python-pymdown-extensions",
"purl": "pkg:rpm/openEuler/python-pymdown-extensions&distro=openEuler-24.03-LTS-SP4",
"ecosystem": "openEuler:24.03-LTS-SP4"
},
"database_specific": {
"source": "https://repo.openeuler.org/security/data/osv/OESA-2026-4182.json"
},
"ecosystem_specific": {
"src": [
"python-pymdown-extensions-10.7-3.oe2403sp4.src.rpm"
],
"noarch": [
"python3-pymdown-extensions-10.7-3.oe2403sp4.noarch.rpm"
]
}
}
]Publisher severity
high
Source reference: /database_specific/severity
- Event
- #52137 · Revision 1
- Added to Heist Feed
- Publisher date