🛡️ Sentinel: [CRITICAL] Fix SSRF in background workers - #86
Conversation
…background processors 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. |
…background processors Co-authored-by: frkr <185359+frkr@users.noreply.github.com>
…background processors Co-authored-by: frkr <185359+frkr@users.noreply.github.com>
🚨 Severity: CRITICAL
💡 Vulnerability: The background queue processors (
MQDestiny.tsandMQCallback.ts) did not validate the protocol of user-hydrated or externally supplied URLs before making outboundfetchrequests.🎯 Impact: This lack of validation could allow Server-Side Request Forgery (SSRF). An attacker could exploit this by crafting payloads with
file:,javascript:, ordata:protocols, forcing the server to read local files or make arbitrary internal requests, potentially bypassing security policies.🔧 Fix: Parsed the destination and callback URLs using the
URLobject and enforced a strict check to ensure their protocol is eitherhttp:orhttps:. If an invalid or malicious protocol is detected, the URL is rejected and the message is safely logged as 'error' inMQStore, returning early to halt execution without throwing an unhandled exception or leaking information.✅ Verification: Ensure the test suite continues to pass (
pnpm test). Thefetchfunction will no longer execute for non-HTTP(S) URLs in background processes.PR created automatically by Jules for task 14747614525031795322 started by @frkr