CVE-2026-142490: Bagpipes through 1.4.1 Code Execution via eval() of fit_instructions
Bagpipes through 1.4.1 contains an eval injection vulnerability in bagpipes/fitting/fit.py and posterior.py that allows attackers to execute Python code by supplying a crafted posterior HDF5 file. Attackers can share a project folder containing a malicious .h5 file whose fitinstructions attribute is passed to eval(), executing code as the user running fitting or plotting scripts.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to exploitation?
Users of Bagpipes through 1.4.1 are exposed when they run fitting or plotting scripts against a project folder containing an attacker-controlled posterior HDF5 (.h5) file. The malicious code executes with the privileges of the user running those scripts.
What must an attacker provide to trigger the issue?
The attacker must supply or persuade the user to use a crafted posterior HDF5 file whose fit_instructions attribute contains Python code. Exploitation requires user interaction: the target must run the relevant fitting or plotting workflow on the malicious project data.
How can I determine whether a project may be affected?
Inspect posterior .h5 files from untrusted or externally shared project folders, particularly the fit_instructions attribute. Affected Bagpipes code passes that attribute to eval() in bagpipes/fitting/fit.py and posterior.py.