/

CVE-2026-40560

Severity:

HIGH RISK

(7.5)

HTTP Request Smuggling in Starman Due to Improper Header

CVE-2026-40560

Analyzed

Vulnerability type

Category:

HTTP Request Smuggling

CWE:

CWE-444

Impact:

Request Smuggling and HTTP Desynchronization

Severity:

HIGH RISK

(7.5)

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

Starman versions before 0.4018 for Perl are vulnerable to HTTP Request Smuggling because the server incorrectly prioritizes the Content-Length header over Transfer-Encoding: chunked when both are present.

This discrepancy from RFC 7230 can allow an attacker to desynchronize Starman from a front-end reverse proxy, enabling smuggling of hidden HTTP requests that bypass normal routing and security controls.

Affected context

The vulnerability appears in deployments where Starman is used behind or alongside an HTTP reverse proxy or load balancer that follows RFC 7230 and honors Transfer-Encoding: chunked over Content-Length.

When such an upstream component parses an HTTP request differently than Starman, an attacker can craft ambiguous requests containing both headers.

The risk is greatest in architectures where Starman is not directly exposed to the internet but relies on a front-end proxy for request normalization, routing, and security enforcement.

Exploit preconditions

  • Attack surface: Public-facing HTTP endpoints that ultimately route traffic to Starman.
  • Required access: Ability to send crafted HTTP requests to the reverse proxy that forwards them to Starman.
  • Trigger point: Requests that include both Content-Length and Transfer-Encoding: chunked headers with conflicting body semantics.
  • Why exploitation is possible: The reverse proxy and Starman disagree about which header takes precedence; the proxy interprets the request one way (per RFC 7230), while Starman prioritizes Content-Length, leading to HTTP stream desynchronization and smuggled inner requests.

Why this happens

The root cause is a protocol parsing inconsistency where Starman violates HTTP/1.1 message framing rules defined in RFC 7230 §3.3.3.

Specifically, when both Transfer-Encoding: chunked and Content-Length are present, Starman treats Content-Length as authoritative rather than Transfer-Encoding, contrary to the standard.

This mis-prioritization maps to CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request Smuggling'), in which upstream and downstream components interpret the same ambiguous request differently, enabling an attacker to hide or "smuggle" follow-on requests inside the connection.

Potential impact

  • Attacker may smuggle additional HTTP requests past the reverse proxy into Starman.
  • Security controls on the proxy (WAF rules, authentication, rate limiting) can be bypassed by hidden requests.
  • Victims' requests may be prefixed or followed by attacker-controlled data, enabling cache poisoning or response splitting scenarios.
  • Internal endpoints not intended to be internet-facing can be accessed indirectly via smuggled requests.
  • Session fixation or hijacking may occur if smuggled traffic interferes with authenticated user streams.

General mitigation guidance

Mitigation generally centers on enforcing consistent, standards-compliant HTTP parsing across all layers and eliminating ambiguous message framing:

  • Ensure HTTP servers and application frameworks follow RFC 7230 semantics, particularly giving precedence to Transfer-Encoding when both headers are present.
  • Configure front-end proxies to normalize or reject requests that contain both Content-Length and Transfer-Encoding headers, or that are otherwise ambiguous.
  • Prefer secure-by-default proxy configurations that block non-compliant or malformed HTTP requests instead of attempting to guess intent.
  • Isolate internal application servers behind proxies that enforce strict request validation and strip or sanitize conflicting headers.
  • Employ least-privilege design on backend routes so that even if a smuggled request reaches Starman, its accessible functionality is minimized.

How teams detect issues like this

Effective detection focuses on identifying both the vulnerable parsing behavior and any anomalous traffic patterns indicative of smuggling attempts:

  • Use static or configuration analysis to inspect HTTP handling code and server options for non-standard handling of Content-Length and Transfer-Encoding.
  • Review reverse proxy and application server configurations for policies on conflicting headers, ambiguous framing, and HTTP/1.1 edge cases.
  • Monitor logs at both proxy and Starman layers, correlating connection IDs and timestamps to detect mismatched request/response counts or unusual pipeline patterns.
  • Employ HTTP fuzzing or specialized security testing tools that generate smuggling payloads to verify whether the environment is susceptible to desynchronization.
  • Integrate automated security scanning into CI/CD that flags non-compliant HTTP parsing behavior and configuration drifts.

Sources

SourceLink
datatracker.ietf.orgdatatracker.ietf.org/doc/html/rfc7230#section-3.3.3
github.comgithub.com/miyagawa/Starman/commit/ced205f0805027e9d9c0731f8c40b104220604ed.patch
metacpan.orgmetacpan.org/release/MIYAGAWA/Starman-0.4018/changes
openwall.comopenwall.com/lists/oss-security/2026/04/29/1

Frequently asked

questions

Yes. An attacker who can send crafted HTTP requests to the front-end proxy that forwards traffic to Starman can exploit this issue remotely, without local access to the server.

The attacker generally needs only the ability to establish an HTTP connection to the exposed endpoint in front of Starman. No prior authentication is typically required, although some impacts may be greater once an attacker has authenticated.

Align Starman's HTTP parsing with RFC 7230 by ensuring Transfer-Encoding: chunked takes precedence over Content-Length, and configure the surrounding infrastructure to reject or normalize conflicting headers rather than attempting to process them.

Use standards-compliant HTTP stacks, enforce strict request validation at the edge, avoid custom parsing logic when possible, and regularly test deployments with automated request-smuggling test suites to catch inconsistencies across proxies and application servers.

Find out what's already
exploitable in your codebase.