# CVE-2018-25110: Regular Expression Denial of Service (ReDoS) in markedjs/marked

> An attacker can cause a denial of service in applications using the marked library by submitting specially crafted markdown input that triggers catastrophic backtracking.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 May 2025
- **Updated:** 23 May 2025
- **Also known as:** DEBIAN-CVE-2018-25110, GHSA-p9wx-2529-fp83, UBUNTU-CVE-2018-25110

## What is CVE-2018-25110?

CVE-2018-25110 is a medium-severity denial of service vulnerability in marked_project:marked, published on 23 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Marked prior to version 0.3.17 is vulnerable to a Regular Expression Denial of Service (ReDoS) attack due to catastrophic backtracking in several regular expressions used for parsing HTML tags and markdown links. An attacker can exploit this vulnerability by providing specially crafted markdown input, such as deeply nested or repetitively structured brackets or tag attributes, which cause the parser to hang and lead to a Denial of Service.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2018-25110?

2 open source packages ship an affected version, including marked. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `marked` | npm | All versions | 0.3.17 |
| `marked` | npm | All versions | 0.3.17 |

Products: Marked Project Marked.

## How do I fix CVE-2018-25110?

Upgrade marked to 0.3.17 or later.

## Is CVE-2018-25110 being exploited?

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

## Other vulnerabilities in marked_project:marked

- [CVE-2026-41680](https://insights.sbomify.com/CVE-2026-41680/): Marked: OOM Denial of Service via Infinite Recursion in marked Tokenizer (high 8.7)
- [CVE-2017-16114](https://insights.sbomify.com/CVE-2017-16114/): Regular Expression Denial of Service in marked (high 7.5)
- [CVE-2014-3743](https://insights.sbomify.com/CVE-2014-3743/): Multiple Content Injection Vulnerabilities in marked (medium 6.1)
- [CVE-2016-10531](https://insights.sbomify.com/CVE-2016-10531/): Sanitization bypass using HTML Entities in marked (medium 6.1)
- [CVE-2017-1000427](https://insights.sbomify.com/CVE-2017-1000427/): Marked vulnerable to XSS from data URIs (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-25110 and fix it if it is affected.

What it is: CVE-2018-25110 is a medium-severity denial of service vulnerability in marked_project:marked, published on 23 May 2025. 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-2018-25110 exists.

Affected packages and fixed versions:
- marked (npm): affected all versions; fixed in 0.3.17
- marked (npm): affected all versions; fixed in 0.3.17

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-2018-25110/ (Markdown: https://insights.sbomify.com/CVE-2018-25110/index.md)
```

## Sources

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

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