/

CVE-2026-42047

Severity:

HIGH RISK

(8.6)

Information Exposure in Inngest serve()

CVE-2026-42047

Analyzed

Vulnerability type

Category:

Information Exposure

CWE:

CWE-200, CWE-497

Impact:

Exposure of Sensitive Environment Variables and Secrets

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A vulnerability in Inngest's serve() HTTP handler causes diagnostic responses for certain HTTP methods to include the entire process.env, exposing environment variables to unauthenticated remote clients.

When the serve() endpoint is reachable via PATCH, OPTIONS, or DELETE, attackers can trigger this diagnostic path and exfiltrate secrets, API keys, and credentials from the host process.

Affected context

This vulnerability affects applications using Inngest versions 3.22.0 through 3.53.1 where:

  • The Inngest serve() endpoint is exposed over HTTP(S), and
  • The endpoint is reachable via PATCH, OPTIONS, or DELETE requests.

These conditions are commonly met in setups such as:

  • Next.js Pages Router when using middleware or catch-all routes that forward multiple HTTP methods to serve(), and
  • Express applications using app.use(...) or similar constructs that do not restrict allowed HTTP methods.

Deployments that only expose GET, POST, and PUT handlers for serve(), or that use the connect worker method, are not affected by this specific leak pattern.

Exploit preconditions

  • Attack surface: Public or internal HTTP endpoint implementing Inngest's serve() handler.
  • Required access: Network access to the serve() endpoint; no authentication is needed.
  • Trigger point: Sending a PATCH, OPTIONS, or DELETE request to the serve() endpoint causes the request to fall through to a generic diagnostic handler.
  • Why exploitation is possible: The generic diagnostic handler, introduced in v3.22.0, includes process.env in its HTTP response body. This constitutes an unintended information exposure of sensitive configuration values available to the host process.

Why this happens

The root cause is an information exposure flaw where diagnostic responses unintentionally include sensitive runtime state.

Specifically, a change to the generic fallback handler for unsupported HTTP methods (PATCH, OPTIONS, DELETE) caused it to serialize and return the contents of process.env as part of the diagnostic payload.

This aligns with:

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor — sensitive environment variables are disclosed to unauthenticated clients.
  • CWE-497: Exposure of System Data to an Unauthorized Control Sphere — detailed runtime configuration (environment variables, secrets, and credentials) is exposed outside the intended control boundary.

Conceptually, the bug stems from using internal debugging/diagnostic responses in production code without properly redacting or omitting secret-bearing fields.

Potential impact

  • Exfiltration of API keys, database passwords, and other secrets stored in environment variables.
  • Unauthorized access to third-party services (payment processors, email providers, storage backends, etc.).
  • Lateral movement within the infrastructure using leaked credentials.
  • Bypass of authentication/authorization controls in downstream systems by replaying service tokens.
  • Facilitation of further exploitation such as data exfiltration, account takeover, or service impersonation.

General mitigation guidance

Mitigations focus on tightening HTTP surface area, sanitizing diagnostics, and hardening secret management:

  • Restrict allowed HTTP methods on the serve() endpoint to only those required (GET, POST, PUT) at the framework or reverse-proxy layer.
  • Avoid returning raw environment variables or other sensitive configuration values in any diagnostic or error responses.
  • Centralize error and diagnostic handling to ensure secrets are redacted or omitted by default.
  • Place Inngest (and similar worker) endpoints behind API gateways or reverse proxies that enforce strict method whitelisting and authentication where appropriate.
  • Reduce secret blast radius by scoping environment variables to the minimum set required for the process, and use dedicated secret stores with fine-grained access controls.
  • Apply least privilege in infrastructure design so that compromise of one service's environment does not grant broad access across systems.

How teams detect issues like this

Detection can rely on a mix of code inspection, automated analysis, and runtime monitoring:

  • Static analysis & code review:
  • Look for HTTP handlers or middleware that:
  • Route multiple HTTP methods (including PATCH, OPTIONS, DELETE) to the same serve() handler.
  • Include process.env, configuration dumps, or similar structures in HTTP responses or logs.
  • Flag patterns where diagnostic or "debug" responses are wired into production routes.
  • Configuration and policy enforcement:
  • Enforce API gateway or reverse-proxy policies that explicitly whitelist allowed methods per endpoint.
  • Use CI/CD checks to ensure certain handlers (e.g., serve()) are only bound to expected methods.
  • Dynamic testing:
  • Perform security testing that sends non-standard HTTP methods (PATCH, OPTIONS, DELETE) to public endpoints and inspects responses for environment variables or configuration dumps.
  • Runtime monitoring:
  • Use logging or WAF tooling to detect responses containing tokens, keys, or typical secret patterns, and alert on unexpected disclosures.

Sources

SourceLink
github.comgithub.com/inngest/inngest-js/releases/tag/inngest%403.54.1
github.comgithub.com/inngest/inngest-js/security/advisories/GHSA-2jf5-6wwv-vhxx

Frequently asked

questions

Yes, if the Inngest serve() endpoint is exposed over the network and reachable with PATCH, OPTIONS, or DELETE requests, an unauthenticated remote attacker can trigger the diagnostic path and retrieve environment variables.

The attacker needs only network-level access to the serve() endpoint; no valid credentials, session, or prior foothold in the system are required. This can make internet-exposed endpoints particularly high-risk.

The safest pattern is to ensure that diagnostic handlers never include environment variables or other secrets in their responses, and to strictly limit HTTP methods exposed by worker or function endpoints to only those required (GET, POST, PUT for Inngest serve()).

Treat diagnostics as sensitive by default: centralize debug output, scrub or redact secrets before logging or responding, enforce method whitelisting at gateways and frameworks, and include automated checks in CI/CD to detect handlers that expose configuration or environment details.

Find out what's already
exploitable in your codebase.