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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | guardrails-ai | >= 0.2.9, < 0.5.10 | 0.5.10 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-45858
- https://github.com/guardrails-ai/guardrails/commit/ab12701e8c3ef41273ff9b3912f2e4e28ae8306f
- https://github.com/guardrails-ai/guardrails
- https://hiddenlayer.com/sai-security-advisory/2024-09-guardrails
- https://pypi.org/project/guardrails-ai
- https://github.com/advisories/GHSA-w392-75q8-vr67
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-95- Platform
- Python (PyPI)
- Package
guardrails-ai- Disclosed
- 18.09.2024
- Updated
- 11.10.2026 13:18
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1432 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-w392-75q8-vr67 - CC BY 4.0
Vulnerability history: guardrails-ai
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 07.2024 05.2026
- Without a fix
- 2
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 2
Disclosures per year
- 2024: 2
- 2025: 0
- 2026: 2
-
Guardrails has an arbitrary code execution vulnerability this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.