---
id: CVE-2024-45858
aliases:
  - GHSA-w392-75q8-vr67
  - PYSEC-2026-1432
title: Guardrails has an arbitrary code execution vulnerability
summary: Guardrails has an arbitrary code execution vulnerability
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
vendor: guardrails-ai
product: guardrails-ai
ecosystem: pip
affected:
  - 'guardrails-ai >= 0.2.9, < 0.5.10'
patched:
  - guardrails-ai 0.5.10
published: '2024-09-18'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-w392-75q8-vr67'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2024-45858'
  - url: >-
      https://github.com/guardrails-ai/guardrails/commit/ab12701e8c3ef41273ff9b3912f2e4e28ae8306f
  - url: 'https://github.com/guardrails-ai/guardrails'
  - url: 'https://hiddenlayer.com/sai-security-advisory/2024-09-guardrails'
tags:
  - osv
  - pip
epss: 0.00375
epssPercentile: 0.28649
ingestedAt: '2026-07-08T18:25:53.527Z'
---

## Overview

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 packages

- `guardrails-ai >= 0.2.9, < 0.5.10`

## Remediation

Upgrade to a patched release:

- `guardrails-ai 0.5.10`
