CVE-2023-26303
Low · 3.3CVSS
3.3
EPSS
0.2%
Published
Feb 23, 2023
CISA due date
—
Cloudanix analysis
A text-processing library can be made to crash when it receives specially formatted input, potentially interrupting any service that converts markdown into web pages or documents.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
Specially crafted input triggers null assertions in markdown-it-py parsers before v2.2.0, causing an unhandled exception that terminates the process.
Why it matters to the business
Applications relying on markdown parsing can be crashed by untrusted input, producing brief service outages or degraded functionality until the affected process restarts.
How an attack unfolds
An attacker supplies a markdown document containing input sequences that force null assertions inside the parser; when the library processes the document the assertion fails and the hosting application terminates.
How to fix it
Upgrade executablebooks/markdown-it-py to the commit ae03c6107dfa18e648f6fdd1280f5b89092d5d49 (equivalent to v2.2.0 or later). Rebuild and redeploy any containers or packages that bundle the library.
How to confirm the fix worked
Confirm the installed markdown-it-py version reports 2.2.0 or newer; replay the original crafted input in a test environment and verify the parser completes without raising an assertion error.
Typical attack path
- Locate any service or tool that accepts untrusted markdown and uses markdown-it-py < 2.2.0
- Craft a minimal markdown payload that triggers a null assertion path inside the parser
- Deliver the payload through the application's normal input channel (file upload, API, clipboard paste, etc.)
- Observe process termination or service restart, confirming the denial-of-service condition
How to detect it
Search application and system logs for unhandled exceptions or assertion failures originating from markdown-it-py while processing user-supplied content; correlate spikes in process restarts with markdown ingestion endpoints.
What your security team should do
- Prioritize upgrade of markdown-it-py in all build pipelines and dependency manifests
- Add automated dependency scanning to block future vulnerable versions from reaching production
- Review logs for repeated markdown parsing crashes as a temporary detection signal until patches are applied
The record
Denial of service could be caused to markdown-it-py, before v2.2.0, if an attacker was allowed to force null assertions with specially crafted input.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | markdown-it-py | 0 | 2.2.0 |
| PyPI | markdown-it-py | 0 | ae03c6107dfa18e648f6fdd1280f5b89092d5d49 |
| Debian:12 | markdown-it-py | 0 | 2.1.0-5 |
| Debian:13 | markdown-it-py | 0 | 2.1.0-5 |
| Ubuntu:22.04:LTS | markdown-it-py | 0 | No fix |
| openSUSE:Tumbleweed | python-markdown-it-py | 0 | 2.2.0-1.1 |