Integer Overflow in Expat (libexpat) before 2.4.3

expat Updated 02 Oct 2025

Summary

10/01/2022
N/A
Yes i
High
8.8

CVE-2022-22827: storeAtts in xmlparse.c in Expat (aka libexpat) before 2.4.3 has an integer overflow. Affects expat across 2 version ranges.

< 2.2.10-r0 < 57c7da69b78e3698e112a6b5da19d5109b8232d1

Fixed in 2.2.10-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Expat (aka libexpat) is an open-source XML parsing library that is widely used in various applications. It provides a set of functions and APIs for parsing XML documents. Expat is vulnerable to an integer overflow in the storeAtts function in xmlparse.c, which can lead to security issues.

Vulnerability Detail

The vulnerability (CVE-2022-22827) arises from an integer overflow in the storeAtts function of Expat. This can be exploited by an attacker to cause a heap-based buffer overflow, potentially leading to arbitrary code execution or denial of service. The issue has a CVSSv3 score of 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

2.2.10-r0

This is the first release that contains the fix.

sudo apk add --upgrade expat

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed version of Expat to mitigate the risk.

Conclusion

The integer overflow vulnerability in Expat (libexpat) before version 2.4.3 can lead to arbitrary code execution or denial of service. It is crucial to update the Expat library to the fixed version and recompile the affected applications to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for expat →

Share this vulnerability

FAQ

Expat (libexpat) is an open-source XML parsing library used in various applications for processing XML documents.

The vulnerability can allow an attacker to execute arbitrary code or cause denial of service by exploiting the integer overflow in Expat.

To fix this vulnerability, update the Expat library to version 2.4.3 or later and recompile the affected applications.

No, there is no known workaround for this vulnerability. Updating to the fixed version is the recommended solution.

The CVSSv3 score of this vulnerability is 8.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for expat.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.2.10-r0

This is the first release that contains the fix.

sudo apk add --upgrade expat

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback