Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2021-3801 — prismjs

MEDIUMFix: prismjs/prism@0ff371b

CVE-2021-3801 is a medium-severity (CVSS 6.5) CWE-1333 vulnerability in prismjs. 1 public exploit reference exists, so weaponization risk is real. A fix is available for prismjs — see the affected versions and patch details below.

prismjs Regular Expression Denial of Service vulnerability

Also known asGHSA-hqhp-5p83-hx96
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 7, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.0%probability of exploitation in next 30 days
Lower Risk-0.01%
Lower risk than most CVEs63th percentile — riskier than 63% of all scored CVEsHighest risk
0.00%0.51%1.03%1.54%0.3%1.0%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-3801 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

5Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
prismjsnpm
39.3Mdownloads / week

Description

Prism is a syntax highlighting library. The prismjs package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide a crafted HTML comment as input may cause an application to consume an excessive amount of CPU.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmprismjsall versions1.25.0npm install prismjs@1.25.0

Affected Products

1 product · 1 configurations
Application
prismprismjs
< 1.25.0
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for prismjs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update prismjs to 1.25.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-3801 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

OpenShift Container Platform (OCP) grafana-container does package a vulnerable verison of prismjs. However due to the instance being read only and behind OpenShift OAuth, it has been given a Low impact. Additionally it has been marked as wont-fix at this time and may be fixed in a future release. Just as OCP,…

ProductFixed inAdvisory
RHACS-3.67-RHEL-8advanced-cluster-security/rhacs-rhel8-operator:3.67.0-3RHSA-2021:4902

Frequently Asked Questions

Prism is a syntax highlighting library. The prismjs package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide a crafted HTML comment as input may cause an application to consume an excessive amount of CPU.
O3 Security · Impact-Aware SCA

Is CVE-2021-3801 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-3801: prismjs DoS — Fixed in 1.25.0