node-marked — security advisory
Marked 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.
- Products
- node-marked
- Affected versions
- 0.3.2+dfsg-1, 0.3.6+dfsg-1, 0.3.9+dfsg-1, 0.5.1+dfsg-1, 0.8.0+ds+repack-2, 0.8.0+ds+repack-3, 18.0.5+~cs7.2.17-2, 18.0.6+~cs7.2.17-1, 18.0.6+~cs7.2.17-2, 4.0.12+ds+~4.0.1-1, 4.0.12+ds+~4.0.1-2ubuntu1, 4.0.12+ds+~4.0.1-2ubuntu2, 4.0.5+ds-5, 4.0.9+ds+~4.0.1-2, 4.2.3+ds+~4.0.7-2ubuntu1, 4.2.3+ds+~4.0.7-3, 4.2.3+ds+~4.0.7-4, 4.3.0+ds1+~cs10.2.23-1
- Fixed versions
- Not specified
- CVEs
- CVE-2022-21681
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:00 UTC · Revision 1
Source evidence
Marked 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.
osv:UBUNTU-CVE-2022-21681
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
node-marked
Fixed versions: Not specified
Complete source record
{
"id": "c1ba8a1971b97682ae9b04b311c77a9c9826a5f86c6ee6a877a3f036fa4dae11",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2022-21681",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2022-21681",
"summary": "Marked 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.",
"evidence": "osv:UBUNTU-CVE-2022-21681",
"products": [
{
"name": {
"value": "node-marked",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "0.3.2+dfsg-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "0.3.6+dfsg-1",
"evidence": "/affected/1/versions"
},
{
"value": "0.3.9+dfsg-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "0.5.1+dfsg-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "0.8.0+ds+repack-2",
"evidence": "/affected/3/versions"
},
{
"value": "0.8.0+ds+repack-3",
"evidence": "/affected/3/versions"
},
{
"value": "4.0.5+ds-5",
"evidence": "/affected/3/versions"
},
{
"value": "4.0.9+ds+~4.0.1-2",
"evidence": "/affected/3/versions"
},
{
"value": "4.0.12+ds+~4.0.1-1",
"evidence": "/affected/3/versions"
},
{
"value": "4.0.12+ds+~4.0.1-2ubuntu1",
"evidence": "/affected/3/versions"
},
{
"value": "4.0.12+ds+~4.0.1-2ubuntu2",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.2.3+ds+~4.0.7-2ubuntu1",
"evidence": "/affected/4/versions"
},
{
"value": "4.2.3+ds+~4.0.7-3",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.2.3+ds+~4.0.7-3",
"evidence": "/affected/5/versions"
},
{
"value": "4.2.3+ds+~4.0.7-4",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.2.3+ds+~4.0.7-4",
"evidence": "/affected/6/versions"
},
{
"value": "4.3.0+ds1+~cs10.2.23-1",
"evidence": "/affected/6/versions"
},
{
"value": "18.0.5+~cs7.2.17-2",
"evidence": "/affected/6/versions"
},
{
"value": "18.0.6+~cs7.2.17-1",
"evidence": "/affected/6/versions"
},
{
"value": "18.0.6+~cs7.2.17-2",
"evidence": "/affected/6/versions"
}
]
},
{
"name": {
"value": "node-marked",
"evidence": "/affected/7/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.2.3+ds+~4.0.7-4",
"evidence": "/affected/7/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "UBUNTU-CVE-2022-21681",
"aliases": [
"UBUNTU-CVE-2022-21681"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=xenial",
"ecosystem": "Ubuntu:16.04:LTS"
},
"versions": [
"0.3.2+dfsg-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "0.3.2+dfsg-1"
},
{
"binary_name": "node-marked",
"binary_version": "0.3.2+dfsg-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=bionic",
"ecosystem": "Ubuntu:18.04:LTS"
},
"versions": [
"0.3.6+dfsg-1",
"0.3.9+dfsg-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "0.3.9+dfsg-1"
},
{
"binary_name": "node-marked",
"binary_version": "0.3.9+dfsg-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"0.5.1+dfsg-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "0.5.1+dfsg-1"
},
{
"binary_name": "node-marked",
"binary_version": "0.5.1+dfsg-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"0.8.0+ds+repack-2",
"0.8.0+ds+repack-3",
"4.0.5+ds-5",
"4.0.9+ds+~4.0.1-2",
"4.0.12+ds+~4.0.1-1",
"4.0.12+ds+~4.0.1-2ubuntu1",
"4.0.12+ds+~4.0.1-2ubuntu2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "4.0.12+ds+~4.0.1-2ubuntu2"
},
{
"binary_name": "node-marked",
"binary_version": "4.0.12+ds+~4.0.1-2ubuntu2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"4.2.3+ds+~4.0.7-2ubuntu1",
"4.2.3+ds+~4.0.7-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "4.2.3+ds+~4.0.7-3"
},
{
"binary_name": "node-marked",
"binary_version": "4.2.3+ds+~4.0.7-3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"4.2.3+ds+~4.0.7-3",
"4.2.3+ds+~4.0.7-4"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "4.2.3+ds+~4.0.7-4"
},
{
"binary_name": "node-marked",
"binary_version": "4.2.3+ds+~4.0.7-4"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"4.2.3+ds+~4.0.7-4",
"4.3.0+ds1+~cs10.2.23-1",
"18.0.5+~cs7.2.17-2",
"18.0.6+~cs7.2.17-1",
"18.0.6+~cs7.2.17-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "18.0.6+~cs7.2.17-2"
},
{
"binary_name": "node-marked",
"binary_version": "18.0.6+~cs7.2.17-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-marked",
"purl": "pkg:deb/ubuntu/node-marked?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"4.2.3+ds+~4.0.7-4"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21681.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libjs-marked",
"binary_version": "4.2.3+ds+~4.0.7-4"
},
{
"binary_name": "node-marked",
"binary_version": "4.2.3+ds+~4.0.7-4"
}
]
}
}
],
"modified": "2026-10-17T12:56:20.792360244Z",
"provider": "osv",
"upstream": [
"CVE-2022-21681"
],
"references": [
"https://ubuntu.com/security/CVE-2022-21681",
"https://github.com/markedjs/marked/security/advisories/GHSA-5v2h-r2cx-5xgj",
"https://www.cve.org/CVERecord?id=CVE-2022-21681"
]
},
"related_cves": [
{
"value": "CVE-2022-21681",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 355357,
"published_at": "2022-01-14T17:15:00+00:00"
}