π‘οΈ Sentinel: [HIGH] Fix SSRF bypass via Local-Use IPv4/IPv6 Translation (RFC 8215)#84
Conversation
β¦on (RFC 8215) Added SSRF protection for Local-Use IPv4/IPv6 Translation mappings (`64:ff9b:1::/96`). Previously, Python's `ipaddress` module evaluated these addresses as globally routable IPv6, allowing an attacker to ping internal IPv4 addresses by wrapping them in this prefix. The embedded IPv4 payload is now manually unwrapped and validated against existing SSRF blocklists. Added corresponding unit tests to prevent regressions. Co-authored-by: ManupaKDU <95234271+ManupaKDU@users.noreply.github.com>
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: HIGH
π‘ Vulnerability: Server-Side Request Forgery (SSRF) bypass allowing attackers to ping internal IP addresses by wrapping them in Local-Use IPv4/IPv6 Translation (RFC 8215) addresses (e.g.,
64:ff9b:1::127.0.0.1). Python'sipaddressmodule evaluates these asis_global = Trueand does not automatically extract the embedded IPv4 address.π― Impact: An attacker could bypass SSRF IP blocklists and probe internal subnets or local resources.
π§ Fix: Added a manual check for the
/96mapping (ip_int >> 32 == 0x0064ff9b0001000000000000) to explicitly unpack the encapsulated IPv4 address and validate it using the standard SSRF blocklist rules. Added tests to guarantee this scenario is caught.β Verification: Run
python3 -m unittest test_testping1.pyand ensure thetest_is_reachable_ssrf_bypass_local_use_translationtest passes.PR created automatically by Jules for task 15943869541579030197 started by @ManupaKDU