Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix Denial of Service (DoS) vulnerability via large bytes input#70

Merged
manupawickramasinghe merged 1 commit into
mainfrom
sentinel/fix-dos-via-large-bytes-10850658358182123367
May 7, 2026
Merged

πŸ›‘οΈ Sentinel: [CRITICAL] Fix Denial of Service (DoS) vulnerability via large bytes input#70
manupawickramasinghe merged 1 commit into
mainfrom
sentinel/fix-dos-via-large-bytes-10850658358182123367

Conversation

@ManupaKDU
Copy link
Copy Markdown
Contributor

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: Denial of Service (DoS) via CPU resource exhaustion. Python's ipaddress.ip_address() function accepts both str and bytes inputs. The application previously only checked the length of str inputs before passing them to the module. Because the ipaddress module's internal parsing can be extremely slow for massively large inputs, an attacker could bypass the str length check by providing a giant bytes payload, causing the parsing process to consume excessive CPU time before eventually raising a ValueError.
🎯 Impact: An attacker could exhaust server resources and block worker threads by sending an excessively large bytes object to any endpoint invoking is_reachable(), leading to an application crash or service unavailability.
πŸ”§ Fix: Extended the input length validation to check both str and bytes using isinstance(ip, (str, bytes)) before calculating the length, blocking large payloads of either type securely.
βœ… Verification: Added test_is_reachable_ip_bytes_too_long to assert that extremely large byte strings are rejected instantaneously. Run python3 -m unittest test_testping1.py to confirm.


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

… large bytes input

Enforced strict length limits on `bytes` inputs in addition to `str`
inputs before passing them to Python's `ipaddress.ip_address()` function
to prevent CPU exhaustion DoS attacks due to inefficient internal parsing
of extremely large byte objects.

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.

@manupawickramasinghe manupawickramasinghe merged commit 82e2618 into main May 7, 2026
1 check passed
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.

2 participants