CVE-2022-25235 is a missing encoding check in Expat (libexpat): before 2.4.5 the parser passes malformed 2- and 3-byte UTF-8 sequences, such as those in tag names, on to the application, which can lead to code execution depending on how the application handles them. NVD scores it 9.8, and Siemens lists S7-1500 MFP firmware as affected.
Vulnerability summary
CVSS base score
9.8
Critical severity
EPSS score (FIRST)
5.0%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
No
Not listed
Published
Vulnerability ID: CVE-2022-25235 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| Expat / libexpat (xmltok_impl.c encoding validation) | cpe:2.3:a:libexpat_project:libexpat:*:*:*:*:*:*:*:* | before 2.4.5 (fixed in 2.4.5, 18 February 2022) |
| Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP (GNU/Linux subsystem) | — | V3.1.0 to before V3.1.5 (fixed in V3.1.5, per SSA-398330) |
What does this mean for affected devices?
CVE-2022-25235 is an improper encoding validation flaw (CWE-116) in Expat (libexpat). NVD's description: "xmltok_impl.c in Expat (aka libexpat) before 2.4.5 lacks certain validation of encoding, such as checks for whether a UTF-8 character is valid in a certain context." NVD's Primary CVSS 3.1 score is 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).
The Expat Changes file for 2.4.5 (18 February 2022) explains the impact: "Passing malformed 2- and 3-byte UTF-8 sequences (e.g. from start tag names) to the XML processing application on top of Expat can cause arbitrary damage (e.g. code execution) depending on how invalid UTF-8 is handled inside the XML processor; validation was not their job but Expat's." It adds: "Exploits with code execution are known to exist." The upstream fix is pull request #562, "Protect against malformed encoding (e.g. malformed UTF-8)". So the damage happens in the application above Expat, which trusts the parser to hand it valid UTF-8; how bad it is depends on that application's string handling.
Siemens ProductCERT lists a controller that ships the vulnerable Expat. SSA-398330 covers the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP and SIPLUS S7-1500 CPU 1518-4 PN/DP MFP from V3.1.0 to before V3.1.5, scores the CVE 9.8 and lists V3.1.5 as the fix. Siemens also lists the SINEMA Remote Connect Server before V3.1 in SSA-484086, a server application rather than device firmware.
For device firmware the exposure follows the XML input: a UPnP SOAP handler or configuration import that parses XML from the LAN passes element and attribute names straight to application code. Distribution backports keep old version strings: the Debian tracker marks buster fixed in 2.2.6-2+deb10u3 and bullseye in 2.2.10-2+deb11u2, both by DSA-5085-1. The same class of bug came back for UTF-16 input as CVE-2026-93990, fixed in Expat 2.8.5, so a fix for this CVE alone does not close the class.
This CVE is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13, CISA KEV), despite the upstream note on known exploits. FIRST EPSS gives it 0.050, the 92.3rd percentile, in its 2026-11-15 dataset (FIRST EPSS).
The fix is Expat 2.4.5 or later, and in practice the current Expat release. Our zlib, Expat and libxml2 vulnerabilities in embedded firmware guide treats this CVE as applicable whenever network XML reaches the parser and shows the upgrade path, and the input handling fix guide covers validating untrusted input at the boundary. See also CVE-2022-40674, a use-after-free fixed in Expat 2.4.9.
Evidence
- xmltok_impl.c in Expat before 2.4.5 lacks certain validation of encoding; NVD Primary CVSS 3.1 9.8; CWE-116. — NVD
- Expat 2.4.5 (18 Feb 2022): malformed 2- and 3-byte UTF-8 passed to the application can cause arbitrary damage (e.g. code execution); exploits with code execution are known to exist. — Expat Changes
- Fix: pull request #562, protect against malformed encoding. — libexpat pull request #562
- S7-1500 CPU 1518(F)-4 PN/DP MFP and SIPLUS variant GNU/Linux subsystem V3.1.0 to before V3.1.5 affected, fix V3.1.5; Siemens CVSS 9.8. SSA-484086 lists SINEMA Remote Connect Server before V3.1. — Siemens SSA-398330
- Debian buster fixed in 2.2.6-2+deb10u3, bullseye in 2.2.10-2+deb11u2 (DSA-5085-1). — Debian Security Tracker
- Not in the CISA KEV catalog version 2026.11.13 as of 2026-11-16. — CISA KEV
- EPSS 0.04955, percentile 0.92312, dataset 2026-11-15. — FIRST EPSS

Related advisories
Sources
- NVD
- Expat Changes (release 2.4.5)
- libexpat pull request #562 (protect against malformed encoding)
- Siemens SSA-398330 (S7-1500 CPU 1518 MFP GNU/Linux subsystem before V3.1.5)
- Siemens SSA-484086 (SINEMA Remote Connect Server before V3.1)
- Debian Security Tracker
- CISA KEV
- CISA KEV data (catalog JSON)
- FIRST EPSS
Frequently asked questions
Where does the damage from CVE-2022-25235 happen?
In the application on top of Expat. Expat before 2.4.5 passes malformed UTF-8 through, and the impact depends on how the application handles invalid UTF-8; upstream says exploits with code execution are known to exist (per the Expat Changes file).
Which industrial products are affected by CVE-2022-25235?
Siemens SSA-398330 lists the GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP from V3.1.0 to before V3.1.5, fixed in V3.1.5; SSA-484086 lists the SINEMA Remote Connect Server before V3.1 (per Siemens ProductCERT).
Does upgrading to Expat 2.4.5 close every encoding bug of this kind?
No. A related UTF-16 issue, CVE-2026-93990, was fixed in Expat 2.8.5 with an upstream CVSS 3.1 score of 9.8, so the current Expat release is the safer target (per the Expat Changes file).
Is CVE-2022-25235 in the CISA KEV catalog?
No, it is absent from catalog version 2026.11.13 as of 2026-11-16. FIRST EPSS gives it 0.050, the 92.3rd percentile, in the 2026-11-15 dataset (per CISA KEV and FIRST EPSS).
Questions about this page?