π‘οΈ Sentinel: [HIGH] Fix SSRF vulnerability in background workers - #85
π‘οΈ Sentinel: [HIGH] Fix SSRF vulnerability in background workers#85frkr wants to merge 1 commit into
Conversation
Added protocol validation in `src/mq/MQDestiny.ts` and `src/mq/MQCallback.ts` to ensure that only `http:` and `https:` URLs are fetched, mitigating Server-Side Request Forgery (SSRF) vulnerabilities where attackers could use malicious protocols like `file://` or `ftp://`. 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. |
π¨ Severity: HIGH
π‘ Vulnerability: Server-Side Request Forgery (SSRF) vulnerability in background workers processing messages. The workers blindly passed
asyncContent.destinyandasyncContent.callbacktofetch()without verifying the URL protocol. This meant that an attacker who managed to queue an asynchronous message could supply a non-HTTP URL (likefile://,ftp://, etc.) causing the worker to interact with internal or unexpected external systems.π― Impact: High. Depending on the Cloudflare Worker runtime restrictions or eventual deployment context, fetching unintended protocols or internal endpoints can lead to data leakage, bypassing network access controls, and probing internal infrastructure.
π§ Fix:
new URL()in a try/catch block.http:orhttps:scheme.'error'and processing returns early, preventing infinite loops and dangerous operations.β Verification: Tested against the full test suite (
pnpm test), ensuring that 12 test files passed successfully, without regressions.PR created automatically by Jules for task 1502159186315946944 started by @frkr