5.4medium
@digitalocean/do-markdownit has Type Confusion vulnerability
- Severity
- 5.4medium CVSS:3.1 by mitre
- Exploit likelihood
- 0.40% (higher than 36% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-2h8j-8r9p-849f
Description
In the @digitalocean/do-markdownit package through 1.16.1 (in npm), the callout and fence_environment plugins perform .includes substring matching if allowedClasses or allowedEnvironments is a string (instead of an array).
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| DigitalOcean @digitalocean/do-markdownit | up to 1.16.1 | CVE List |
| @digitalocean/do-markdownit (npm) | up to 1.16.1 | GitHub Advisory Database |
| digitalocean do-markdownit | up to 1.16.1 | NVD |
All scores
| mitre | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
In the @digitalocean/do-markdownit package through 1.16.1 (in npm), the callout and fence_environment plugins perform .includes substring matching if allowedClasses or allowedEnvironments is a string (instead of an array).
GitHub Advisory Database
Overview
A type confusion issue exists in the @digitalocean/do-markdownit package. In the callout and fence_environment plugins, the allowedClasses and allowedEnvironments options are expected to be arrays of strings. If these options are provided as a single string, the code applies .includes directly on the string, resulting in substring matching instead of membership checks against an array.
Affected Versions
All versions up to and including 1.16.1 (npm).
Impact
Supplying crafted input can bypass intended allow-lists (e.g., class/environment constraints) due to substring checks, which may enable rendering of unintended classes or environments and lead to policy bypass in downstream consumers.
Mitigation
Until an upstream fix is released, ensure configuration normalization before invoking the plugins:
- Validate that
allowedClassesandallowedEnvironmentsare arrays (Array.isArray(...)), converting single strings into one-element arrays when necessary. - Consider sanitizing or strictly validating user-controlled values that influence Markdown rendering.
References
| https://github.com/digitalocean/do-markdownit | package, product | |
| https://gist.github.com/thesmartshadow/dd19665f1f51a4e3c7a766e70c9eafd0 | exploit, third-party-advisory, web | |
| https://www.npmjs.com/package/@digitalocean/do-markdownit | product, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-59717 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-59717 changed 2025-09-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2h8j-8r9p-849f changed 2025-09-22 | CC-BY-4.0 |
| NVD | CVE-2025-59717 changed 2026-06-17 | Public domain |