{"id":"CVE-2025-59717","aliases":["CVE-2025-59717","GHSA-2h8j-8r9p-849f"],"related":[],"kind":"vulnerability","state":"published","title":"@digitalocean/do-markdownit has Type Confusion vulnerability","summary":"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).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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).","source":"cvelist"},{"lang":"en","text":"### Overview\nA 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.\n\n### Affected Versions\nAll versions up to and including 1.16.1 (npm).\n\n### Impact\nSupplying 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.\n\n### Mitigation\nUntil an upstream fix is released, ensure configuration normalization before invoking the plugins:\n- Validate that `allowedClasses` and `allowedEnvironments` are arrays (`Array.isArray(...)`), converting single strings into one-element arrays when necessary.\n- Consider sanitizing or strictly validating user-controlled values that influence Markdown rendering.","format":"markdown","source":"ghsa"}],"published":"2025-09-19T00:00:00.000Z","modified":"2026-06-17T09:46:35.680Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-843"],"affected":[{"ranges":[{"type":"semver","introduced":"0","lastAffected":"1.16.1","status":"affected"}],"vendor":"DigitalOcean","product":"@digitalocean/do-markdownit","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.16.1"}],"ecosystem":"npm","package":"@digitalocean/do-markdownit","purl":"pkg:npm/%40digitalocean/do-markdownit","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"1.16.1"}],"vendor":"digitalocean","product":"do-markdownit","cpe":"cpe:2.3:a:digitalocean:do-markdownit:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/digitalocean/do-markdownit","tags":["package","product"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://gist.github.com/thesmartshadow/dd19665f1f51a4e3c7a766e70c9eafd0","tags":["exploit","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/@digitalocean/do-markdownit","tags":["product","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59717","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-09-19T13:32:05.608Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-59717","url":"https://www.cve.org/CVERecord?id=CVE-2025-59717","licence":"CVE Terms of Use","modified":"2025-09-19T13:32:08.575Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2h8j-8r9p-849f","url":"https://github.com/advisories/GHSA-2h8j-8r9p-849f","licence":"CC-BY-4.0","modified":"2025-09-22T22:55:37.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-59717","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59717","licence":"Public domain","modified":"2026-06-17T09:46:35.680Z"}],"updatedAt":"2026-11-25T22:59:04.847Z","epss":{"score":0.00403,"percentile":0.36655,"date":"2026-12-01T12:00:22.000Z"}}