CVE-2024-45858: Guardrails has an arbitrary code execution vulnerability
An arbitrary code execution vulnerability exists in versions 0.2.9 up to 0.5.10 of the Guardrails AI Guardrails framework because of the way it validates XML files. If a victim user loads a maliciously crafted XML file containing Python code, the code will be passed to an eval function, causing it to execute on the user's machine.
Published Sep 18, 2024
Affected packages
guardrails-ai
- Ecosystem
- PyPI
- Affected
- >= 0.2.9, < 0.5.10
- Fixed in
- 0.5.10
- Check
pip show guardrails-ai
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
An arbitrary code execution vulnerability exists in versions 0.2.9 up to 0.5.10 of the Guardrails AI Guardrails framework because of the way it validates XML files. If a victim user loads a maliciously crafted XML file containing Python code, the code will be passed to an eval function, causing it to execute on the user's machine.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Guardrails AI vulnerabilities
All Guardrails AI entriesCVE-2026-45758
Malicious code in guardrails-ai 0.10.1 (supply chain compromise)
critical9.6No fixMay 19, 2026CVE-2026-31233
Guardrails AI contains a code injection vulnerability in its Hub package installation mechanism
critical9.8No fixMay 12, 2026CVE-2024-6961
Guardrails AI vulnerable to Improper Restriction of XML External Entity Reference
high5.9Jul 21, 2024
