CVE-2026-142490: Bagpipes through 1.4.1 Code Execution via eval() of fit_instructions

Published Dec 2, 2026
·
Updated

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

1 affected component
pypi/bagpipes<=1.4.1

Event History

Dec 2, 2026
CVE Published
via MITRE·05:42 PM
Data Sourced
via MITRE·05:42 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:19 PM
DescriptionSeverityWeakness
Event
via NVD·06:19 PM

Frequently Asked Questions

1

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.

2

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.

3

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203