CVE-2025-59717: Critical severity digitalocean do-markdownit vulnerability

Published Sep 19, 2025
·
Updated

Overview A type confusion issue exists in the @digitalocean/do-markdownit package. In the callout and fenceenvironment 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 allowedClasses and allowedEnvironments are arrays (Array.isArray(...)), converting single strings into one-element arrays when necessary. - Consider sanitizing or strictly validating user-controlled values that influence Markdown rendering.

Other sources

In the @digitalocean/do-markdownit package through 1.16.1 (in npm), the callout and fenceenvironment plugins perform .includes substring matching if allowedClasses or allowedEnvironments is a string (instead of an array).

MITRE

Affected Software

3 affected components
digitalocean do-markdownit<=1.16.1
npm/@digitalocean/do-markdownit<=1.16.1
digitalocean Do-markdownit Node.js<=1.16.1

Event History

Sep 19, 2025
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 AM
Affected Software
Advisory Published
via GitHub·06:31 AM
Data Sourced
via GitHub·06:31 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-59717?

The severity of CVE-2025-59717 is classified as medium due to potential security implications arising from improper handling of allowedClasses or allowedEnvironments.

2

How do I fix CVE-2025-59717?

To fix CVE-2025-59717, update the @digitalocean/do-markdownit package to version 1.16.2 or later, which corrects the substring matching issue.

3

What versions of @digitalocean/do-markdownit are affected by CVE-2025-59717?

Versions up to and including 1.16.1 of the @digitalocean/do-markdownit package are affected by CVE-2025-59717.

4

What components of the @digitalocean/do-markdownit package are involved in CVE-2025-59717?

CVE-2025-59717 involves the callout and fence_environment plugins within the @digitalocean/do-markdownit package.

5

Can CVE-2025-59717 lead to security vulnerabilities in applications?

Yes, CVE-2025-59717 can lead to security vulnerabilities in applications if the handling of input through allowedClasses or allowedEnvironments is exploited.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203