{
  "id": "CVE-2025-57822",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-57822",
  "published_at": "2025-08-29T21:33:15.304Z",
  "title": "Next.js Improper Middleware Redirect Handling Leads to SSRF",
  "vendor": "vercel",
  "product": "next.js",
  "cvss": {
    "score": 8.2,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2025-09-02T07:09:16Z",
    "first_seen_at": null,
    "days_after_publication": 3.4,
    "source": "nuclei",
    "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-57822.yaml"
  },
  "poc_repo_count": 0,
  "exploit_count": 1,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Next.js is a React framework for building full-stack web applications. Prior to versions 14.2.32 and 15.4.7, when next() was used without explicitly passing the request object, it could lead to SSRF in self-hosted applications that incorrectly forwarded user-supplied headers. This vulnerability has been fixed in Next.js versions 14.2.32 and 15.4.7. All users implementing custom middleware logic in self-hosted environments are strongly encouraged to upgrade and verify correct usage of the next() function.",
  "cwe": "CWE-918",
  "cpes": [
    "cpe:2.3:a:vercel:next.js:*:*:*:*:*:node.js:*:*"
  ],
  "cvss_by_source": {
    "cna": 6.5,
    "nvd": 8.2
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "vercel",
        "product": "next.js",
        "ranges": [
          "\u003c 14.2.32",
          "\u003c 15.4.7"
        ],
        "fixed_in": [
          "14.2.32",
          "15.4.7"
        ]
      }
    ],
    "upgrade": [
      "Upgrade next.js to 14.2.32 or 15.4.7 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8"
      },
      {
        "kind": "Release notes",
        "url": "https://vercel.com/changelog/cve-2025-57822"
      }
    ]
  },
  "exploit_refs": [
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-57822.yaml",
      "source": "nuclei",
      "title": "nuclei template: Next.js Middleware - Server-Side Request Forgery",
      "published_at": "2025-09-02T07:09:16Z",
      "first_seen_at": "2026-11-16T08:31:11.222Z"
    }
  ],
  "hunt_profile": [],
  "rules": []
}
