DEV Community

CVE Reports
CVE Reports

Posted on Originally published at cvereports.com

CVE-2026-71425: CVE-2026-71425: Server-Side Request Forgery and OAuth Token Exposure in Outstatic GitHub REST Proxy

CVE-2026-71425: Server-Side Request Forgery and OAuth Token Exposure in Outstatic GitHub REST Proxy

Vulnerability ID: CVE-2026-71425
CVSS Score: 6.5
Published: 2026-11-18

CVE-2026-71425 (GHSA-7jvc-9xq8-frff) is a Server-Side Request Forgery (SSRF) and credential exposure vulnerability in Outstatic, an open-source Next.js-based static site Content Management System (CMS). In versions prior to 2.2.1, the authenticated GitHub REST proxy (/api/outstatic/github) constructed upstream URLs via insecure string concatenation of an unvalidated endpoint parameter and merged arbitrary user-supplied HTTP headers directly into outbound requests. Because the proxy automatically attaches the active user's GitHub OAuth access token to these requests, an authenticated caller or an attacker leveraging a cross-origin request primitive can redirect the server's outbound request to an arbitrary external host and exfiltrate the OAuth bearer token.

TL;DR

Outstatic versions prior to 2.2.1 are vulnerable to Server-Side Request Forgery (CWE-918) in the /api/outstatic/github proxy endpoint. Improper URL concatenation and unrestricted HTTP header merging allow authenticated users or chained client-side attacks to force the server to transmit active GitHub OAuth bearer tokens to arbitrary third-party servers. Upgrading to Outstatic 2.2.1 enforces strict origin validation and header allowlisting.


Technical Details

  • CVE / GHSA ID: CVE-2026-71425 / GHSA-7jvc-9xq8-frff
  • Weakness Class: CWE-918 (Server-Side Request Forgery)
  • CVSS v3.1 Score: 6.5 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N)
  • Affected Component: packages/outstatic/src/app/api/github/github.ts (/api/outstatic/github)
  • Affected Versions: outstatic < 2.2.1 (Patched in 2.2.1)
  • Primary Impact: Exfiltration of active user GitHub OAuth bearer tokens to arbitrary external hosts
  • Exploit / KEV Status: No public PoC / Not listed in CISA KEV

Affected Systems

  • Outstatic CMS (npm package: outstatic) versions < 2.2.1
  • outstatic: < 2.2.1 (Fixed in: 2.2.1)

Code Analysis

Commit: 65df36b

fix GitHub url formation and canonicalize forwarded GitHub headers

--- a/packages/outstatic/src/app/api/github/github.ts
+++ b/packages/outstatic/src/app/api/github/github.ts
@@ -16,6 +16,51 @@ const GitHubRestRequestSchema = z.object({

 type GitHubRestRequest = z.infer<typeof GitHubRestRequestSchema>

+const GITHUB_API_ORIGIN = 'https://api.github.com'
+const FORWARDED_GITHUB_HEADERS = new Set([
+  'accept',
+  'content-type',
+  'x-github-api-version'
+])
+
+const CANONICAL_FORWARDED_GITHUB_HEADERS: Record<string, string> = {
+  accept: 'Accept',
+  'content-type': 'Content-Type',
+  'x-github-api-version': 'X-GitHub-Api-Version'
+}
+
+function getForwardedHeaders(headers?: Record<string, string>) {
+  if (!headers) return {}
+
+  const result: Record<string, string> = {}
+
+  for (const [header, value] of Object.entries(headers)) {
+    const lowerHeader = header.toLowerCase()
+
+    if (FORWARDED_GITHUB_HEADERS.has(lowerHeader)) {
+      result[CANONICAL_FORWARDED_GITHUB_HEADERS[lowerHeader]] = value
+    }
+  }
+
+  return result
+}
+
+function buildGitHubUrl(endpoint: string, queryParams?: URLSearchParams) {
+  if (!endpoint.startsWith('/')) return null
+
+  const url = new URL(endpoint, GITHUB_API_ORIGIN)
+
+  if (url.origin !== GITHUB_API_ORIGIN) return null
+
+  if (queryParams) {
+    for (const [key, value] of queryParams.entries()) {
+      url.searchParams.append(key, value)
+    }
  }
+
+  return url.toString()
+}
Enter fullscreen mode Exit fullscreen mode

Commit: 03b9147

Release Outstatic v2.2.1

Mitigation Strategies

  • Upgrade Outstatic to version 2.2.1 or later to enforce strict URL origin validation and canonical HTTP header allowlisting.
  • Implement reverse proxy or Next.js middleware filtering on /api/outstatic/github to block requests where the endpoint parameter does not start with a single forward slash (/) or contains authority characters (@, //).
  • Restrict outbound network egress from the Next.js server runtime to allow HTTPS connections only to known required upstream domains such as api.github.com.
  • Revoke and rotate active GitHub OAuth access tokens and OAuth App secrets if the instance was accessible to untrusted collaborators or shows evidence of anomalous proxy requests.

Remediation Steps:

  1. Audit package.json and lockfiles (package-lock.json, yarn.lock, pnpm-lock.yaml) to identify if outstatic is installed at a version prior to 2.2.1.
  2. Run 'npm install outstatic@latest' (or the equivalent pnpm/yarn command) to update the dependency to >= 2.2.1.
  3. Rebuild and redeploy the Next.js application to ensure the updated /api/outstatic/github route handler is active in production.
  4. Review application access logs for POST or GET requests to /api/outstatic/github containing '//', '@', or custom Host headers, and revoke associated GitHub OAuth tokens in GitHub Settings > Applications if indicators of compromise are found.

References


Read the full report for CVE-2026-71425 on our website for more details including interactive diagrams and full exploit analysis.

Top comments (0)