PYSEC-2026-347
Vulnerability from pysec - Published: 2026-06-29 11:50 - Updated: 2026-07-01 20:22Guardrails 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.
| Name | purl | guardrails-ai | pkg:pypi/guardrails-ai |
|---|
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "guardrails-ai",
"purl": "pkg:pypi/guardrails-ai"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.6.7"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.1.0",
"0.1.0rc1",
"0.1.0rc2",
"0.1.0rc3",
"0.1.1",
"0.1.2",
"0.1.3",
"0.1.4",
"0.1.5",
"0.1.6",
"0.1.7",
"0.1.8",
"0.1.9",
"0.2.0",
"0.2.0a1",
"0.2.0a2",
"0.2.0a3",
"0.2.0a4",
"0.2.0a5",
"0.2.0a6",
"0.2.1",
"0.2.1a0",
"0.2.2",
"0.2.3",
"0.2.3a1",
"0.2.4",
"0.2.4a1",
"0.2.5",
"0.2.6",
"0.2.7",
"0.2.8",
"0.2.9",
"0.3.0",
"0.3.1",
"0.3.2",
"0.3.3",
"0.4.0",
"0.4.1",
"0.4.2",
"0.4.3",
"0.4.4",
"0.4.5",
"0.5.0",
"0.5.0a0",
"0.5.0a1",
"0.5.0a10",
"0.5.0a11",
"0.5.0a12",
"0.5.0a13",
"0.5.0a2",
"0.5.0a3",
"0.5.0a4",
"0.5.0a5",
"0.5.0a6",
"0.5.0a7",
"0.5.0a8",
"0.5.0a9",
"0.5.1",
"0.5.10",
"0.5.11",
"0.5.12",
"0.5.13",
"0.5.14",
"0.5.15",
"0.5.2",
"0.5.3",
"0.5.4",
"0.5.5",
"0.5.6",
"0.5.7",
"0.5.8",
"0.5.9",
"0.6.0",
"0.6.0a1",
"0.6.0a2",
"0.6.0a3",
"0.6.0a4",
"0.6.1",
"0.6.2",
"0.6.3",
"0.6.4",
"0.6.5",
"0.6.6",
"0.6.7"
]
}
],
"aliases": [
"CVE-2026-31233",
"GHSA-r6hf-g5x6-7pv9"
],
"details": "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.",
"id": "PYSEC-2026-347",
"modified": "2026-07-01T20:22:54.068049Z",
"published": "2026-06-29T11:50:50.458991Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31233"
},
{
"type": "PACKAGE",
"url": "https://github.com/guardrails-ai/guardrails"
},
{
"type": "WEB",
"url": "https://www.notion.so/CVE-2026-31233-35d1e13931888142a954fb3f50ee0c94"
},
{
"type": "PACKAGE",
"url": "https://pypi.org/project/guardrails-ai"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-r6hf-g5x6-7pv9"
}
],
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Guardrails AI contains a code injection vulnerability in its Hub package installation mechanism"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.