feat: add vuln module for NextJS middleware bypass CVE-2025-29927 (CISA KEV)#1476
feat: add vuln module for NextJS middleware bypass CVE-2025-29927 (CISA KEV)#1476Dami99-b wants to merge 1 commit intoOWASP:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Summary by CodeRabbitRelease Notes
WalkthroughAdds a new vulnerability module Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@nettacker/modules/vuln/nextjs_cve_2025_29927.yaml`:
- Around line 37-41: The static Next.js asset
"_next/static/chunks/pages/_app.js" can produce false positives because it is
publicly served even on patched systems; remove that entry from the path list
(leave "admin", "dashboard", "api/admin") OR, if you must keep it as a
fingerprint, add an inline comment explaining it is only a heuristic and
strengthen the check in the detection logic (e.g., verify response body
signatures or auth-required headers rather than only HTTP 200) so the module
nextjs_cve_2025_29927.yaml does not treat public static assets as definitive
vulnerability evidence.
- Line 57: Update the regex value used for Next.js detection in the YAML's regex
field: replace the `_nextjs` token with the more accurate `_next/` so the
pattern becomes "__NEXT_DATA__|_next/|next/dist"; if `_nextjs` was intentionally
included for this CVE, add a short inline comment next to the regex explaining
that rationale instead of leaving the ambiguous `_nextjs` token.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2b92c6fe-aed7-4b9f-be52-7f032434c71c
📒 Files selected for processing (1)
nettacker/modules/vuln/nextjs_cve_2025_29927.yaml
0270f21 to
6e4b26b
Compare
…SA KEV) - Sends GET request with x-middleware-subrequest header to detect auth bypass - Targets protected paths: admin, dashboard, api/admin - Matches HTTP 200 + Next.js body signatures - Removed static path to prevent false positives on patched systems - Fixes OWASP#1449
6e4b26b to
dafc202
Compare
|
@Dami99-b Before creating a PR you should atleast ask the person if he is currently working on the issue, you can't just create a PR on someone's issue directly |
oh I sincerely apologise for any inconveniences this might have caused you. |
Proposed change
Adds a vulnerability detection module for CVE-2025-29927, an
unauthenticated authorization bypass in Next.js listed in CISA's
Known Exploited Vulnerabilities catalog.
The module sends a GET request with the internal header:
x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware
If the server returns 200 and the response contains Next.js signatures
(NEXT_DATA, next/dist), the target is flagged as vulnerable.
Affected versions: Next.js < 12.3.5, < 13.5.9, < 14.2.25, < 15.2.3
Closes #1449