Junglewise Threat Intelligence

CVE-2026-9147: scikit-hep uproot code injection in TStreamerInfo metadata

CVE-2026-9147 · Severity: high · CVSS 7.8 · Published 2026-07-18

Executive brief

Uproot is a Python library used to read and write ROOT files, a data format common in high-energy physics. A vulnerability exists where the library improperly handles metadata within these files, allowing a malicious file to execute arbitrary Python code on a user's system. An attacker could exploit this by tricking a researcher or data scientist into opening a specially crafted data file, potentially leading to full system compromise or data theft.

Technical details

Uproot (versions 5.7.4 and prior) is vulnerable to code injection (CWE-94) due to the unsafe generation of Python class source code from ROOT TStreamerInfo records. The library interpolates file-controlled metadata, such as streamer element names, into Python source code without proper sanitization or quoting (e.g., using repr()). An attacker can provide a crafted ROOT file containing malicious Python expressions within these metadata fields. When the library processes the file and invokes the dynamically generated reader methods, the injected code is executed with the privileges of the application. The vulnerability was addressed in commit c045c28 by replacing unsafe eval() calls with ast.literal_eval() and improving streamer reading logic.

Affected products

  • scikit-hep uproot <= 5.7.4

Timeline

  • 2026-06-09: patched: Fix committed to scikit-hep/uproot5 repository.
  • 2026-07-18: advisory: NVD and VulnCheck published the advisory.

References