Skip to content

🛡️ Sentinel: [CRITICAL] Fix YAML injection in yaml_safe - #69

Open
Jandir wants to merge 1 commit into
mainfrom
sentinel/yaml-injection-fix-7854859371893512479
Open

🛡️ Sentinel: [CRITICAL] Fix YAML injection in yaml_safe#69
Jandir wants to merge 1 commit into
mainfrom
sentinel/yaml-injection-fix-7854859371893512479

Conversation

@Jandir

@Jandir Jandir commented Jul 25, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: CRITICAL
💡 Vulnerability: YAML Injection via unescaped characters in PEP-750 yaml_safe tag function. Attackers could break out of double-quoted contexts and manipulate YAML structure by injecting backslashes, newlines, or carriage returns.
🎯 Impact: Attackers could inject arbitrary keys or corrupt the generated metadata header, potentially leading to downstream parsing failures or data corruption.
🔧 Fix: Updated escriba.py:yaml_safe to explicitly escape \, ", \n, and \r (in that order).
✅ Verification: test_yaml_safe_injection_prevention added to tests/test_escriba.py and the fix was manually verified via a scratchpad script. The full test suite has been run to ensure no regressions.


PR created automatically by Jules for task 7854859371893512479 started by @Jandir

- Update yaml_safe to explicitly escape backslashes, double quotes, newlines, and carriage returns in that order to prevent structural YAML injection.
- Add security test to tests/test_escriba.py.
- Update Sentinel journal with vulnerability learnings.

Co-authored-by: Jandir <3695656+Jandir@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant