🛡️ Sentinel: [HIGH] Fix SSRF vulnerability in worker outbound fetches - #90
🛡️ Sentinel: [HIGH] Fix SSRF vulnerability in worker outbound fetches#90frkr wants to merge 1 commit into
Conversation
…mic URLs The background queue workers (`MQDestiny.ts` and `MQCallback.ts`) previously parsed URLs using `new URL()` but didn't strictly validate that the protocol resolved to `http:` or `https:`. This could allow Server-Side Request Forgery (SSRF) attacks utilizing alternative protocols (e.g., `file://`, `data://`). This commit adds a strict protocol check using the parsed `URL` object and fails gracefully with an 'error' type logged to `MQStore` when the protocol is invalid. Co-authored-by: frkr <185359+frkr@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. |
This PR addresses a Server-Side Request Forgery (SSRF) vulnerability.
In
MQDestiny.tsandMQCallback.ts, dynamic destinations and callback URLs were fetched without strictly asserting the URL scheme. An attacker could have abused this to trigger fetches against local protocols (likefile://) depending on the execution context.The fix explicitly uses
new URL()to both assert valid URL structure and verify that theprotocolstrictly matches eitherhttp:orhttps:prior to dispatchingfetch. Invalid combinations result in the message being safely marked as anerror.PR created automatically by Jules for task 8582038654550307091 started by @frkr