libexpat through 2.9.0 Integer Overflow in storeAtts via attIndex and nPrefixes
Impact
libexpat through 2.9.0 contains a signed integer overflow vulnerability in storeAtts() in lib/xmlparse.c that allows attackers to trigger out-of-bounds writes via oversized attribute counts. Attackers can supply a multi-gigabyte document with a start tag carrying over 2^30 attributes to overflow attIndex and nPrefixes, crashing applications or corrupting heap memory.
Source excerpt · VulnCheckAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
libexpat · libexpat
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 through 2.9.0 (inclusive) | affected |
Original source description
libexpat through 2.9.0 contains a signed integer overflow vulnerability in storeAtts() in lib/xmlparse.c that allows attackers to trigger out-of-bounds writes via oversized attribute counts. Attackers can supply a multi-gigabyte document with a start tag carrying over 2^30 attributes to overflow attIndex and nPrefixes, crashing applications or corrupting heap memory.
References
- Patch github.com/libexpat/libexpat/pull/1450
- Patch github.com/libexpat/libexpat/commit/1bac53c4fc460a03cd9860f39501c7979f6750ae
- Patch github.com/libexpat/libexpat/commit/621cb2c78b253ee023a86bc91d6ddb048481c04c
- Source reference github.com/libexpat/libexpat/blob/a76b1174c1ea52abb639a4c69d52b630a8a106a2/expat/lib/xmlparse.c
- Source reference github.com/libexpat/libexpat
- Security advisory www.vulncheck.com/advisories/libexpat-through-2.9.0-integer-overflow-in-storeatts-via-attindex-and-nprefixes