Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2021-30640

MEDIUM 6.5EPSS 96%

Auth weakness in JNDIRealm

Also known as BIT-tomcat-2021-30640, GHSA-36qh-35cm-5w2w

Mitigation

  • Upgrade org.apache.tomcat:tomcat to one of 10.0.5, 9.0.45, 8.5.65 (or later in the same release line).

Who should check

  • Projects that depend on Maven package org.apache.tomcat:tomcat (>= 10.0.0-M1, < 10.0.5)
  • Anyone running Apache Software Foundation Apache Tomcat Apache Tomcat 10 10.0.0-M1 to 10.0.5; Apache Tomcat 9 9.0.0.M1 to 9.0.45; Apache Tomcat 8.5 8.5.0 to 8.5.65; Apache Tomcat 7 7.0.0 to 7.0.108

Vulnerability facts

Affected
org.apache.tomcat:tomcat >= 10.0.0-M1, < 10.0.5
Fixed in
10.0.5, 9.0.45, 8.5.65
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
6.5 (v3.1, NVD)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: None
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: Low
  • Integrity impact: High
  • Availability impact: None
EPSS
9.33% chance of exploitation in 30 days (percentile 96, 2026-11-26)
CWE
CWE-116
Published
Modified

Description

A vulnerability in the JNDI Realm of Apache Tomcat allows an attacker to authenticate using variations of a valid user name and/or to bypass some of the protection provided by the LockOut Realm. This issue affects Apache Tomcat 10.0.0-M1 to 10.0.5; 9.0.0.M1 to 9.0.45; 8.5.0 to 8.5.65.

Affected and fixed versions

Package / productAffectedFixedSource
Maven org.apache.tomcat:tomcat>= 10.0.0-M1, < 10.0.510.0.5, 9.0.45, 8.5.65osv
Apache Software Foundation Apache TomcatApache Tomcat 10 10.0.0-M1 to 10.0.5; Apache Tomcat 9 9.0.0.M1 to 9.0.45; Apache Tomcat 8.5 8.5.0 to 8.5.65; Apache Tomcat 7 7.0.0 to 7.0.108—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2021-30640. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-30640.md
Affected: org.apache.tomcat:tomcat >= 10.0.0-M1, < 10.0.5
Fixed in: 10.0.5, 9.0.45, 8.5.65

Steps:
1. Search this machine and project for org.apache.tomcat:tomcat (Maven), Apache Software Foundation Apache Tomcat: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2021-30640 being exploited?

There is no confirmed exploitation: CVE-2021-30640 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 9.33% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2021-30640?

Medium: CVSS 6.5 (v3.1, scored by NVD). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2021-30640?

org.apache.tomcat:tomcat >= 10.0.0-M1, < 10.0.5.

Is there a fix for CVE-2021-30640?

Yes. Fixed in 10.0.5, 9.0.45, 8.5.65. Upgrade org.apache.tomcat:tomcat to one of 10.0.5, 9.0.45, 8.5.65 (or later in the same release line).

How do I check if I'm affected by CVE-2021-30640?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors