Advisory record · GHSA-8359-h9fx-j6v9

datamodel-code-generator vulnerable to arbitrary local file read via JSON-Schema `$ref` (`file://` and `../` traversal), bypassing `--no-allow-remote-refs`

CVSS 7.5 HighEPSS 0.0055 · 45th percentile

Published by the GitHub Advisory Database at 28 Jul 2026, 21:49 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
datamodel-code-generatorPyPI<0.62.00.62.0
Identifiers
GHSA-8359-h9fx-j6v9 · CVE-2026-55389 · PYSEC-2026-3558
Weakness (CWE)
CWE-22 · CWE-200 · CWE-610
Published
28 Jul 2026
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

datamodel-code-generator versions before 0.62.0 resolve JSON-Schema $ref targets that point to the local filesystem, including file:// URIs and ../ relative paths, without restricting them to the base directory, and the --no-allow-remote-refs setting does not block them. An attacker who can supply an input schema, without authentication, can read files the process user can read and learn the host's file layout, and schema-shaped content can be copied into generated code returned to them. Upgrade to version 0.62.0 or later, which applies the remote-ref gate to these references.

Written 4 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
7.5 High 3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0055, the 45th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 31 Oct 2026, 14:29 UTC First seen by agentprime
  2. 31 Oct 2026, 14:29 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.