pymdown-extensions — security advisory
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.
- Products
- pymdown-extensions
- Affected versions
- 10.13-3, 10.13-4, 10.19.1-3, 11.0.1-1, 9.5-2, 9.5-4, 9.5-5
- Fixed versions
- Not specified
- CVEs
- CVE-2026-46338
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 00:32 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2026-46338
pymdown-extensions
Fixed versions: Not specified
pymdown-extensions
Fixed versions: Not specified
pymdown-extensions
Fixed versions: Not specified
Complete source record
{
"id": "c96f77b7d4e4d8a684c870a411895b52efa16b093beb2996ff5cc063a80aa1e9",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-46338",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2026-46338",
"summary": "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.",
"evidence": "osv:UBUNTU-CVE-2026-46338",
"products": [
{
"name": {
"value": "pymdown-extensions",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "9.5-2",
"evidence": "/affected/0/versions"
},
{
"value": "9.5-4",
"evidence": "/affected/0/versions"
},
{
"value": "9.5-5",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "pymdown-extensions",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "10.19.1-3",
"evidence": "/affected/1/versions"
},
{
"value": "11.0.1-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "pymdown-extensions",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "10.13-3",
"evidence": "/affected/2/versions"
},
{
"value": "10.13-4",
"evidence": "/affected/2/versions"
},
{
"value": "10.19.1-3",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2026-46338",
"aliases": [
"UBUNTU-CVE-2026-46338"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymdown-extensions",
"purl": "pkg:deb/ubuntu/pymdown-extensions?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"9.5-2",
"9.5-4",
"9.5-5"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-46338.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pymdownx",
"binary_version": "9.5-5"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymdown-extensions",
"purl": "pkg:deb/ubuntu/pymdown-extensions?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"10.19.1-3",
"11.0.1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-46338.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pymdownx",
"binary_version": "11.0.1-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymdown-extensions",
"purl": "pkg:deb/ubuntu/pymdown-extensions?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"10.13-3",
"10.13-4",
"10.19.1-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-46338.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pymdownx",
"binary_version": "10.19.1-3"
}
]
}
}
],
"modified": "2026-10-17T12:55:37.580629718Z",
"provider": "osv",
"upstream": [
"CVE-2026-46338"
],
"references": [
"https://ubuntu.com/security/CVE-2026-46338",
"https://www.cve.org/CVERecord?id=CVE-2026-46338",
"https://github.com/facelessuser/pymdown-extensions/commit/63b7835776d703d6c339cf2110d9888f676efc0c",
"https://github.com/facelessuser/pymdown-extensions/releases/tag/10.21.3",
"https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-62q4-447f-wv8h"
]
},
"related_cves": [
{
"value": "CVE-2026-46338",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 353913,
"published_at": "2026-07-16T19:16:00+00:00"
}