🛡️ Sentinel: [HIGH] Fix Server-Side Request Forgery (SSRF) in background workers - #91
🛡️ Sentinel: [HIGH] Fix Server-Side Request Forgery (SSRF) in background workers#91frkr wants to merge 2 commits into
Conversation
…und workers Added explicit protocol validation (`http:` and `https:`) in `MQDestiny.ts` and `MQCallback.ts` to prevent Server-Side Request Forgery (SSRF) attacks when executing `fetch` against dynamically provided URLs. Updated Sentinel journal with security findings. 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. |
…und workers Added explicit protocol validation (`http:` and `https:`) in `MQDestiny.ts` and `MQCallback.ts` to prevent Server-Side Request Forgery (SSRF) attacks when executing `fetch` against dynamically provided URLs. Updated Sentinel journal with security findings. Co-authored-by: frkr <185359+frkr@users.noreply.github.com>
🚨 Severity: HIGH
💡 Vulnerability: Background workers (
MQDestiny.tsandMQCallback.ts) were susceptible to Server-Side Request Forgery (SSRF). They fetched user-provided dynamic URLs (destinyandcallback) retrieved from JSON configs in R2, but did not validate the protocol. This allowed attackers to potentially use schemes likefile://orgopher://to access unauthorized local files or interact with internal systems.🎯 Impact: Potential unauthorized access to internal resources, sensitive data exposure, or server compromise.
🔧 Fix: Added explicit protocol validation (
http:andhttps:) inMQDestiny.tsandMQCallback.tsusingnew URL()to prevent Server-Side Request Forgery (SSRF) attacks when executingfetchagainst dynamically provided URLs. Messages with invalid protocols are gracefully marked aserrorto avoid infinite retry loops. Also recorded the security finding in the.jules/sentinel.mdjournal.✅ Verification: Unit tests passed verifying no regressions in the task runner. Try providing a
file://orftp://scheme in a dynamicdestinyorcallbackconfiguration; the worker should properly reject the URL and save anerrorstate.PR created automatically by Jules for task 17945132342917951522 started by @frkr