Uproot dynamically generates Python class source from ROOT TStreamerInfo records and compiles it at runtime. Some file-controlled streamer metadata fields are interpolated into generated Python source without safe quoting, such as repr() / !r.
An attacker who can provide a crafted ROOT file can place Python expression-breaking content into streamer metadata, such as a crafted element name. When uproot generates and invokes the corresponding reader method, the injected Python expression executes in the context of the process using uproot.
Impact
Arbitrary Python code execution in applications that open or process attacker-controlled ROOT files with affected uproot code paths.
Patches
Uproot v5.7.5 contains the patch.
Users of packages that depend on Uproot, such as Coffea, should update Uproot too.
References
Uproot dynamically generates Python class source from ROOT TStreamerInfo records and compiles it at runtime. Some file-controlled streamer metadata fields are interpolated into generated Python source without safe quoting, such as
repr()/!r.An attacker who can provide a crafted ROOT file can place Python expression-breaking content into streamer metadata, such as a crafted element name. When uproot generates and invokes the corresponding reader method, the injected Python expression executes in the context of the process using uproot.
Impact
Arbitrary Python code execution in applications that open or process attacker-controlled ROOT files with affected uproot code paths.
Patches
Uproot v5.7.5 contains the patch.
Users of packages that depend on Uproot, such as Coffea, should update Uproot too.
References