Miggo Logo

CVE-2021-43980: Apache Tomcat Race Condition vulnerability

3.7

CVSS Score
3.1

Basic Information

EPSS Score
0.37829%
Published
9/29/2022
Updated
3/11/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.tomcat:tomcatmaven>= 8.5.0, < 8.5.788.5.78
org.apache.tomcat:tomcatmaven>= 9.0.0-M1, < 9.0.629.0.62
org.apache.tomcat:tomcatmaven>= 10.0.0-M1, < 10.0.2010.0.20
org.apache.tomcat:tomcatmaven>= 10.1.0-M1, < 10.1.0-M1410.1.0-M14

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from improper synchronization around Http11Processor instance management. The commit diff shows critical changes: 1) Replacing getCurrentProcessor() with takeCurrentProcessor() (atomic get-and-clear), 2) Converting currentProcessor to AtomicReference. The original functions lacked atomic operations, allowing race conditions where multiple client connections could share a processor instance. The vulnerable functions directly handled processor association/dissociation without thread-safe mechanisms, leading to response mix-ups between clients.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** simpli*i** impl*m*nt*tion o* *lo*kin* r***s *n* writ*s intro*u*** in Tom**t ** *n* ***k-port** to Tom**t *.*.** onw*r*s *xpos** * lon* st*n*in* (*ut *xtr*m*ly **r* to tri***r) *on*urr*n*y *u* in *p**** Tom**t **.*.* to **.*.*-M**, **.*.*-M* to **

Reasoning

T** vuln*r**ility st*mm** *rom improp*r syn**roniz*tion *roun* `*ttp**Pro**ssor` inst*n** m*n***m*nt. T** *ommit *i** s*ows *riti**l ***n**s: *) R*pl**in* `**t*urr*ntPro**ssor()` wit* `t*k**urr*ntPro**ssor()` (*tomi* **t-*n*-*l**r), *) *onv*rtin* `*u