Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Fix Log Injection / CRLF Injection via IPv6 Scope ID#42

Merged
ManupaKDU merged 1 commit intomainfrom
sentinel-fix-log-injection-5413652337044024307
Apr 5, 2026
Merged

πŸ›‘οΈ Sentinel: [HIGH] Fix Log Injection / CRLF Injection via IPv6 Scope ID#42
ManupaKDU merged 1 commit intomainfrom
sentinel-fix-log-injection-5413652337044024307

Conversation

@ManupaKDU
Copy link
Copy Markdown
Contributor

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Log Injection (CRLF Injection). The ipaddress module permits arbitrary characters (like \r and \n) in the scope ID of an IPv6 address (e.g. fe80::1%eth0\nERROR:root:...). Since the SSRF validation block rejected these addresses but logged the untrusted input directly, an attacker could inject forged entries into application logs.
🎯 Impact: Log forging, confusion, corruption of log-analysis systems, and potential masking of other malicious activities.
πŸ”§ Fix: Wrapped the ip argument in repr() before logging it to safely escape any control characters (e.g., converting \n to \n literal). Added a regression test (test_is_reachable_ssrf_log_injection) to test_testping1.py.
βœ… Verification: Ran python3 -m unittest test_testping1.py and confirmed the new test passes, demonstrating the newline character is correctly escaped.


PR created automatically by Jules for task 5413652337044024307 started by @ManupaKDU

Uses `repr(ip)` to safely format IP addresses when logging them in the SSRF validation block. This prevents an attacker from injecting arbitrary log entries by passing an IPv6 address with a malicious scope ID containing newline (`\n` or `\r`) characters.

Co-authored-by: ManupaKDU <95234271+ManupaKDU@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.

@ManupaKDU ManupaKDU merged commit dd9ba7f into main Apr 5, 2026
1 check passed
@manupawickramasinghe manupawickramasinghe deleted the sentinel-fix-log-injection-5413652337044024307 branch April 8, 2026 08:27
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