VYPR
Medium severity5.9NVD Advisory· Published Jul 21, 2024· Updated Apr 15, 2026

CVE-2024-6961

CVE-2024-6961

Description

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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
guardrails-aiPyPI
< 0.5.00.5.0

Patches

1
f3d806afee31

Merge pull request #922 from guardrails-ai/rail-xxe-fix

2 files changed · +2 2
  • guardrails/classes/templating/constants_container.py+1 1 modified
    @@ -17,7 +17,7 @@ def fill_constants(self) -> None:
             with open(constants_file, "r") as f:
                 xml = f.read()
     
    -        parser = ET.XMLParser(encoding="utf-8")
    +        parser = ET.XMLParser(encoding="utf-8", resolve_entities=False)
             parsed_constants = ET.fromstring(xml, parser=parser)
     
             for child in parsed_constants:
    
  • guardrails/schema/rail_schema.py+1 1 modified
    @@ -350,7 +350,7 @@ def rail_string_to_schema(rail_string: str) -> ProcessedSchema:
             validators=[], validator_map={}, exec_opts=GuardExecutionOptions()
         )
     
    -    XMLPARSER = XMLParser(encoding="utf-8")
    +    XMLPARSER = XMLParser(encoding="utf-8", resolve_entities=False)
         rail_xml: _Element = ET.fromstring(rail_string, parser=XMLPARSER)
     
         # Load <output /> schema
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.