# CVE-2026-48988: markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations

> Attackers can cause denial of service via CPU exhaustion in markdown-it when the typographer option is enabled.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jun 2026
- **Updated:** 18 Jun 2026
- **Also known as:** CLEANSTART-2026-EO06774, CLSA-2026-1787916789, CLSA-2026-1790161417, CLSA-2026-1790598013, CLSA-2026-1792369116, CLSA-2026-1792451528, DEBIAN-CVE-2026-48988, ECHO-8bc4-9be0-6bd8, GHSA-6v5v-wf23-fmfq, MINI-6q6w-c5ww-pxwv, MINI-79gr-xrqf-9xxc, MINI-8fx6-26f8-vhqf, MINI-8mqq-r4f3-grgp, MINI-8pr5-95j3-p5ff, MINI-94qf-w7cc-hv65, MINI-c6f6-j95g-5vfq, MINI-p449-wr5f-r82g, MINI-rr4r-w44p-vm7g, MINI-vf4m-2rp6-77v6, MINI-x3fv-f728-v28v, ROOT-APP-NPM-CVE-2026-48988, UBUNTU-CVE-2026-48988

## What is CVE-2026-48988?

CVE-2026-48988 is a medium-severity denial of service vulnerability in markdown-it, published on 17 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

markdown-it is a Markdown parser. Versions 14.1.1 and below contain a denial-of-service vulnerability when typographer: true is enabled, due to quadratic (O(n^2)) processing in the smartquotes rule. The issue stems from repeatedly modifying strings with replaceAt(), which performs O(n) slicing and concatenation per quote character. This can cause excessive CPU consumption when parsing quote-heavy, user-supplied markdown and may let attackers degrade or disrupt service availability. Although typographer is disabled by default, many production apps enable it for smart typography, making the issue relevant. This issue has been fixed in version 14.2.0.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-48988?

2 open source packages ship an affected version, including markdown-it. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `markdown-it` | npm | All versions | 14.2.0 |
| `markdown-it` | npm | All versions | 14.2.0 |

Products: Markdown-It Project Markdown-It.

## How do I fix CVE-2026-48988?

Upgrade markdown-it to 14.2.0 or later.

## Is CVE-2026-48988 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48988 exists.

## Other vulnerabilities in markdown-it

- [CVE-2026-2327](https://insights.sbomify.com/CVE-2026-2327/): markdown-it is has a Regular Expression Denial of Service (ReDoS) (medium 6.9)
- [CVE-2025-7969](https://insights.sbomify.com/CVE-2025-7969/): Markdown-it 14.1.0 - Cross-site scripting (XSS) (medium 6.9)
- [CVE-2022-21670](https://insights.sbomify.com/CVE-2022-21670/): Uncontrolled Resource Consumption in markdown-it (medium 5.3)
- [CVE-2015-3295](https://insights.sbomify.com/CVE-2015-3295/): Cross-site scripting in n/a (medium 5.3)
- [CVE-2015-10005](https://insights.sbomify.com/CVE-2015-10005/): markdown-it html_re.js redos (low 3.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48988 and fix it if it is affected.

What it is: CVE-2026-48988 is a medium-severity denial of service vulnerability in markdown-it, published on 17 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48988 exists.

Affected packages and fixed versions:
- markdown-it (npm): affected all versions; fixed in 14.2.0
- markdown-it (npm): affected all versions; fixed in 14.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48988/ (Markdown: https://insights.sbomify.com/CVE-2026-48988/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48988
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48988
- OSV: https://osv.dev/vulnerability/CVE-2026-48988

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48988/
Summaries are generated and may contain mistakes; the official description above is the record.
