Fix: Remove insecure proxy fallback and prevent IP spoofing vulnerability#976
Fix: Remove insecure proxy fallback and prevent IP spoofing vulnerability#976ArshVermaGit wants to merge 1 commit into
Conversation
|
@ArshVermaGit is attempting to deploy a commit to the durdana3105's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesProxy Trust Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This PR addresses the critical IP spoofing vulnerability reported in issue #855 by entirely removing the insecure fallback behavior inside backend/app.js where app.set("trust proxy", 1) was used when TRUST_PROXY=true without subnet definitions. To ensure the application cannot be deployed in a dangerously vulnerable state where malicious actors could inject arbitrary IP addresses into the X-Forwarded-For header and bypass rate limiting, the server will now log a fatal security error and strictly run process.exit(1) if proxy trusting is requested but explicit comma-separated subnet ranges are not provided via the TRUSTED_PROXIES environment variable.
Closes #855
Summary by CodeRabbit