CVE-2024-6961: Guardrails ai Guardrails AI Vulnerable To Improper Vulnerability
HIGHCVE-2024-6961 is a HIGH (CVSS 5.9) guardrails ai vulnerable to improper vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Guardrails ai libraries in the PyPI ecosystem. The issue involves guardrails ai vulnerable to improper restriction of xml external entity reference. Remediation is available by upgrading affected packages to version 0.5.0.
CVE-2024-6961 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2024-6961
To remediate this vulnerability, upgrade all affected Guardrails ai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install guardrails-ai>=0.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show guardrails-ai
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-6961, inspect your installed packages using pip:
pip show guardrails-ai
Analyze the terminal output to locate any version of Guardrails ai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.0), your application is affected.
Note: The pip show guardrails-ai command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Guardrails ai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-6961 Affected Guardrails ai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
guardrails-ai
|
PyPI |
< 0.5.0
|
0.5.0
|
References
Frequently Asked Questions
What is CVE-2024-6961?
Which Guardrails ai versions are affected?
What version fixes CVE-2024-6961?
Is guardrails-ai affected?
What is the CVSS score of CVE-2024-6961?
What CWE is associated with CVE-2024-6961?
How can I check PyPI dependencies for CVE-2024-6961?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f8hx-f4xw-c646",
"modified" : "2024-11-18T16:26:54Z",
"published" : "2024-07-21T12:30:48Z",
"aliases" : [ "CVE-2024-6961" ],
"summary" : "Guardrails AI vulnerable to Improper Restriction of XML External Entity Reference",
"details" : "RAIL documents are an XML-based format invented by Guardrails AI to enforce formatting checks on LLM outputs. Guardrails users that consume RAIL documents from external sources are vulnerable to XXE, which may cause leakage of internal file data via the SYSTEM entity.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "guardrails-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6961"
}, {
"type" : "WEB",
"url" : "https://github.com/guardrails-ai/guardrails/pull/922"
}, {
"type" : "WEB",
"url" : "https://github.com/guardrails-ai/guardrails/commit/f3d806afee31e2e3f97af682d16c3c1bc0d3c380"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/guardrails-ai/guardrails"
}, {
"type" : "WEB",
"url" : "https://research.jfrog.com/vulnerabilities/guardrails-rail-xxe-jfsa-2024-001035519"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-22T14:44:52Z",
"nvd_published_at" : "2024-07-21T11:15:03Z"
}
}