
This script scans a list of URLs to detect if they are using **Next.js** and determines whether they are vulnerable to **CVE-2025-29927**. It optionally attempts exploitation using a wordlist.
This script scans a list of URLs to detect if they are using Next.js and determines whether they are vulnerable to CVE-2025-29927. It optionally attempts exploitation using a wordlist.
# Clone the repository
git clone https://github.com/ferpalma21/Automated-Next.js-Security-Scanner-for-CVE-2025-29927.git
cd Automated-Next.js-Security-Scanner-for-CVE-2025-29927.git
# Install dependencies
npm install
Run the script with different options:
node index.js -u "https://example.com" -v
node index.js -u "https://example.com"
node index.js -u "https://site1.com, https://site2.com"
node index.js -f urls.txt
node index.js -u "https://example.com" -o results.txt
node index.js -u "https://example.com" -v
node index.js -u "https://example.com" -a -w wordlist.txt
-v): Detailed logs printed to the console.-v is not set, results are printed as JSON.-o): Saves detected vulnerabilities to a file.Analyzing: https://example.com
https://example.com is running Next.js version: 13.5.9.
Potentially vulnerable to CVE-2025-29927.
Upgrade to Next.js 14.2.25 or 15.2.3 or later. If upgrading is not possible, block the x-middleware-subrequest header at the WAF or server level. Patched versions: 15.2.3, 14.2.25, 13.5.9, 12.3.5
This project is licensed under the MIT License.
| Option | Alias | Description |
|---|
-u | --urls | List of URLs (space/comma-separated) |
-f | --file | File containing URLs (one per line) |
-c | --chrome | Path to Chromium (default: /snap/bin/chromium) |
-o | --output | File to save vulnerable site results |
-v | --verbose | Enables detailed output |
-r | --redirect | Follows redirects (optional, may lead to false positives) |
-a | --attack | Attempts exploitation (use with caution) |
-w | --wordlist | Wordlist file for exploitation |
-t | --headless | Runs Puppeteer in headless mode |
-x | --headers | If fails to exploit will retry with different headers |