CVE-2022-21681

NameCVE-2022-21681
DescriptionMarked is a markdown parser and compiler. Prior to version 4.0.10, the regular expression `inline.reflinkSearch` may cause catastrophic backtracking against some strings and lead to a denial of service (DoS). Anyone who runs untrusted markdown through a vulnerable version of marked and does not use a worker with a time limit may be affected. This issue is patched in version 4.0.10. As a workaround, avoid running untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-marked (PTS)bullseye0.8.0+ds+repack-2vulnerable
bookworm4.2.3+ds+~4.0.7-2fixed
sid, trixie4.2.3+ds+~4.0.7-3fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-markedsourcestretch(unfixed)end-of-life
node-markedsource(unstable)4.0.12+ds+~4.0.1-1

Notes

[bullseye] - node-marked <no-dsa> (Minor issue)
[buster] - node-marked <no-dsa> (Minor issue)
[stretch] - node-marked <end-of-life> (Nodejs in stretch not covered by security support)
https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj
https://github.com/markedjs/marked/commit/8f806573a3f6c6b7a39b8cdb66ab5ebb8d55a5f5
https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0 (4.0.10)
https://github.com/markedjs/marked/releases/tag/v4.0.10

Search for package or bug name: Reporting problems