π‘οΈ Sentinel: [HIGH] Fix SSRF vulnerability in website analysis and document processing - #404
π‘οΈ Sentinel: [HIGH] Fix SSRF vulnerability in website analysis and document processing#404criptogus wants to merge 1 commit into
Conversation
β¦cument processing π¨ Severity: HIGH π‘ Vulnerability: Server-Side Request Forgery (SSRF) bypass via redirects. The `validateWebUrl` function checked the initial URL, but `axios` followed redirects automatically, potentially exposing private internal services. π― Impact: Attackers could access internal services or read metadata by supplying a malicious URL that redirects to internal IPs. π§ Fix: Implemented safe HTTP/HTTPS agents with custom DNS lookup validation to prevent SSRF and DNS rebinding. Applied to `WebsiteAnalysisService` and `DocumentSourceProcessorService`. β Verification: Added unit tests for IP blocking logic. Co-authored-by: criptogus <128640021+criptogus@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) bypass via redirects. The
validateWebUrlfunction checked the initial URL, butaxiosfollowed redirects automatically, potentially exposing private internal services (e.g. metadata services) if the target server redirected to a private IP.π― Impact: Attackers could access internal services, read metadata, or perform port scanning on the internal network by supplying a malicious URL that redirects to internal IPs.
π§ Fix:
backend/src/utils/ssrf-filter.tsto includegetSafeHttpAgentandgetSafeHttpsAgent.WebsiteAnalysisServiceandDocumentSourceProcessorServiceto use these safe agents.β Verification:
backend/src/utils/ssrf-filter.test.tsto verify IP blocking logic.npx jest.PR created automatically by Jules for task 18376192908279637184 started by @criptogus