Miggo Logo

CVE-2021-23926: Improper Restriction of Recursive Entity References in Apache XMLBeans

9.1

CVSS Score
3.1

Basic Information

EPSS Score
0.54702%
Published
6/16/2021
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.xmlbeans:xmlbeansmaven< 3.0.03.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from uncontrolled recursive entity processing in the SAX parser implementation. The patch adds three key mitigations: 1) Byte counting in characters() to limit entity size, 2) Entity nesting depth tracking via startEntity/endEntity, and 3) A configurable byte limit through XmlOptions. The affected methods - characters(), startEntity(), and endEntity() - handled entity content processing without these restrictions in vulnerable versions, making them the entry points for entity expansion attacks. Their unpatched behavior would appear in stack traces during exploitation as they directly process entity content without validation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T** XML p*rs*rs us** *y XML***ns up to v*rsion *.*.* *i* not s*t t** prop*rti*s n***** to prot**t t** us*r *rom m*li*ious XML input. Vuln*r**iliti*s in*lu** possi*iliti*s *or XML *ntity *xp*nsion *tt**ks. *****ts XML***ns up to *n* in*lu*in* v*.*.*.

Reasoning

T** vuln*r**ility st*mm** *rom un*ontroll** r**ursiv* *ntity pro**ssin* in t** S*X p*rs*r impl*m*nt*tion. T** p*t** ***s t*r** k*y miti**tions: *) *yt* *ountin* in ***r**t*rs() to limit *ntity siz*, *) *ntity n*stin* **pt* tr**kin* vi* st*rt*ntity/*n