CVE-2023-26302
Low · 3.3CVSS
3.3
EPSS
0.2%
Published
Feb 22, 2023
CISA due date
—
Cloudanix analysis
A markdown tool's command-line version can be crashed by feeding it certain bad characters, interrupting any automated tasks that depend on it.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Invalid UTF-8 input to the markdown-it-py command line interface before version 2.2.0 triggers a crash, resulting in denial of service limited to the local CLI process with no impact on confidentiality or integrity.
Why it matters to the business
Disruption to any automated scripts, documentation pipelines, or developer workflows that rely on the markdown-it-py CLI for processing untrusted markdown content, potentially halting builds or content generation until the process is restarted.
How an attack unfolds
An attacker with the ability to supply input to the markdown-it-py CLI passes a string containing invalid UTF-8 byte sequences; the parser fails to handle the malformed data and terminates the process, achieving a local denial of service. No remote code execution or privilege escalation occurs.
How to fix it
Upgrade executablebooks/markdown-it-py to a version containing commit 53ca3e9c2b9e9b295f6abf7f4ad2730a9b70f68c or later; rebuild or reinstall any dependent packages that bundle the CLI.
How to confirm the fix worked
Confirm the installed version reports a commit after 53ca3e9c2b9e9b295f6abf7f4ad2730a9b70f68c; test by piping a known invalid UTF-8 sequence to the CLI and verifying the process no longer crashes.
Typical attack path
- Locate systems or scripts invoking the markdown-it-py CLI on potentially untrusted input
- Craft or modify input to contain invalid UTF-8 byte sequences
- Feed the malformed input to the CLI command
- Observe process termination and service unavailability
How to detect it
Inspect process logs and crash reports for unhandled exceptions or tracebacks originating from markdown-it-py when processing input; correlate CLI invocations with sudden process exits around the time malformed content was supplied.
What your security team should do
- Prioritize upgrade of markdown-it-py in all environments that expose the CLI to external input
- Review and restrict CLI usage to trusted input sources until patched
- Add the library to automated dependency scanning to prevent regression
The record
Denial of service could be caused to the command line interface of markdown-it-py, before v2.2.0, if an attacker was allowed to use invalid UTF-8 characters as input.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | markdown-it-py | 0 | 2.2.0 |
| PyPI | markdown-it-py | 0 | 53ca3e9c2b9e9b295f6abf7f4ad2730a9b70f68c |
| 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 |