Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Fix SSRF vulnerability in MQ queue fetch handlers - #88

Open
frkr wants to merge 1 commit into
mainfrom
sentinel-fix-ssrf-mq-4238088066636652976
Open

πŸ›‘οΈ Sentinel: [HIGH] Fix SSRF vulnerability in MQ queue fetch handlers#88
frkr wants to merge 1 commit into
mainfrom
sentinel-fix-ssrf-mq-4238088066636652976

Conversation

@frkr

@frkr frkr commented Aug 6, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Server-Side Request Forgery (SSRF). The queue processors (MQDestiny.ts and MQCallback.ts) were consuming destination and callback URLs originating from database/R2 state without validating the protocol schema before passing them to the server-side fetch() API.
🎯 Impact: Maliciously crafted messages in the queue (or bypassed frontend validations) could trick the backend worker into making requests to unauthorized internal systems, using dangerous schemes like file:// or ftp://, or creating endless retry loops for invalid URLs.
πŸ”§ Fix: Utilized the native V8 new URL() to parse and validate the URLs. Explicitly enforced that the URL protocol must be exactly http: or https:. Invalid URLs or unsupported protocols will be caught securely and marked with an error state in MQStore to avoid retry loops without executing the fetch.
βœ… Verification: Ran pnpm test successfully. Tests for the MQ processors and panel paths successfully pass with no regressions.


PR created automatically by Jules for task 4238088066636652976 started by @frkr

…back handlers

- Added protocol validation (`http:` or `https:`) for dynamic URLs passed to `fetch()` in `src/mq/MQDestiny.ts` and `src/mq/MQCallback.ts`.
- Validates URLs through the native `URL` constructor which safely throws on malformed URLs.
- Invalid or dangerous protocols (e.g. `file://`, `ftp://`) now abort execution and correctly log the message as 'error' in `MQStore` rather than creating an infinite retry loop or exposing internal systems.

Co-authored-by: frkr <185359+frkr@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