CVE-2026-55390 Arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate

High 7.5 Published Updated

Attackers can read arbitrary local files via crafted XML schema locations when using the xmlschema input type, exposing sensitive data to developers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-55390?

CVE-2026-55390 is a high-severity path traversal vulnerability in koxudaxi datamodel-code-generator, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

datamodel-code-generator generates Python data models from schema definitions. From 0.59.0 until 0.62.0, XML Schema parsing in src/datamodel_code_generator/parser/xmlschema.py for --input-file-type xmlschema resolves xs:include, xs:import, xs:redefine, and xs:override schemaLocation values outside the input base path, allowing arbitrary local files to be read and reflected into generated models. This issue is fixed in version 0.62.0.

Weakness: CWE-610, CWE-22, CWE-200

Which versions are affected by CVE-2026-55390?

3 open source packages ship an affected version, including datamodel-code-generator.

PackageAffectedFixed in
datamodel-code-generator PyPIFrom 0.59.00.62.0
datamodel-code-generator PyPIFrom 0.59.00.62.0
datamodel-code-generator PyPIFrom 0.59.00.62.0

How do I fix CVE-2026-55390?

Upgrade datamodel-code-generator to 0.62.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-55390 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-55390 exists.

Sources

Also known as GHSA-442q-2j6p-642g, PYSEC-2026-3556.

Is CVE-2026-55390 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free