Skip to Main Content
Securitysec-023P0

XML delimiting sandboxes untrusted input.

Using <user_input> XML tags to isolate…Using <user_input> XML tags to isolate user content from system instructions reduces cross-context contamination attacks by 60% in Anthropic's internal testing.

Context & Methodology

Without clear structural boundaries, user text blends with system instructions, enabling injection, data exfiltration, and instruction override.

Applicable Use Cases

workflow

Applies To

anthropicopenaigoogle

Primary Impact

security

Confidence Level

High

Platform Status

Planned

Implementation Effort

low

Recommendation

follow

Execution Priority

P0

Put This Evidence to Work

Use the STCO framework to implement findings like this in structured, testable prompts.

Model performance degrades by up to 20% when key information is placed in the middle vs the beginning or end of a 4K-tok.Liu et al., 'Lost in the Middle: How Language Mode…