---
id: CVE-2026-31233
aliases:
  - GHSA-r6hf-g5x6-7pv9
  - PYSEC-2026-347
title: >-
  Guardrails AI contains a code injection vulnerability in its Hub package
  installation mechanism
summary: >-
  Guardrails AI contains a code injection vulnerability in its Hub package
  installation mechanism
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: guardrails-ai
product: guardrails-ai
ecosystem: pip
affected:
  - guardrails-ai <= 0.6.7
published: '2026-05-12'
updated: '2026-10-27'
sourceUpdated: '2026-10-27T17:00:05.141416484Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-r6hf-g5x6-7pv9'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-31233'
  - url: 'https://github.com/guardrails-ai/guardrails'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/guardrails-ai/PYSEC-2026-347.yaml
  - url: 'https://pypi.org/project/guardrails-ai'
  - url: 'https://www.notion.so/CVE-2026-31233-35d1e13931888142a954fb3f50ee0c94'
  - url: 'https://github.com/advisories/GHSA-r6hf-g5x6-7pv9'
tags:
  - osv
  - pip
  - ghsa
epss: 0.00635
epssPercentile: 0.50215
cwe:
  - CWE-94
ingestedAt: '2026-09-12T03:13:01.724Z'
---

## Overview

Guardrails AI thru 0.6.7 contains a code injection vulnerability (CWE-94) in its Hub package installation mechanism. When installing validator packages via guardrails hub install, the system retrieves a manifest from the Guardrails Hub and dynamically executes a script specified in the post_install field. The script path is constructed from untrusted manifest data and executed without proper validation or sanitization, allowing remote code execution. An attacker who can publish malicious packages to the Hub can inject arbitrary code that will be executed on any system where a victim installs the malicious package.

## Affected packages

- `guardrails-ai <= 0.6.7`

## Remediation

Refer to the advisory for the patched release.
