CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-9W88-79F8-M3VP

GHSA-9W88-79F8-M3VP: Insecure Trailer Handling Allows HTTP Header Injection in ewe

Alon Barad
Alon Barad
Software Engineer

Mar 17, 2026·7 min read·19 visits

Executive Summary (TL;DR)

The ewe library incorrectly permitted trailing HTTP headers to overwrite primary request headers due to a permissive denylist. Attackers could exploit this to forge sensitive headers like Authorization or Cookie, bypassing security controls. The issue is resolved in version 3.0.5 by implementing a strict allowlist.

The ewe web server library for Gleam/Erlang contains a moderate-severity vulnerability in its HTTP/1.1 chunked transfer encoding parser. Prior to version 3.0.5, the library utilized an incomplete denylist for processing HTTP trailer headers, enabling attackers to inject or overwrite critical request headers such as Authorization, Cookie, or X-Forwarded-For. This flaw allows for potential authentication bypass, session hijacking, or identity spoofing depending on the specific application logic deployed atop the library.

Vulnerability Overview

The ewe package is a web server library designed for the Gleam and Erlang ecosystems. It handles raw HTTP connection parsing, request routing, and response generation. The vulnerability resides within the library's HTTP/1.1 parsing module, specifically in the routines responsible for handling chunked transfer encoding.

Chunked transfer encoding is a mechanism that allows a server or client to send a data stream in multiple parts without knowing the total content length upfront. The HTTP/1.1 specification allows senders to append "trailer" headers after the final zero-length chunk. These trailers are typically used for metadata generated during the transmission of the body, such as cryptographic checksums or routing diagnostics.

The ewe implementation failed to properly constrain which headers could be supplied in this trailer section. The library categorized incoming trailer fields using a permissive denylist, classified under CWE-184 (Incomplete List of Disallowed Inputs). This architectural decision exposed the server to header injection attacks, where malicious actors could manipulate the internal state of the request object before it reached the application routing layer.

The impact of this flaw is highly dependent on the upstream application architecture. Applications relying on the web framework to validate standard headers for authentication, authorization, or client identification are directly exposed to bypass attacks. By overwriting key headers from the trailer, an attacker controls the security context evaluated by the application.

Root Cause Analysis

The root cause of this vulnerability stems from the combination of an incomplete denylist and a permissive header merging strategy. In the src/ewe/internal/http.gleam module, the handle_trailers function is responsible for parsing headers sent after the final chunk. The original implementation attempted to block dangerous headers using the is_forbidden_trailer function.

The is_forbidden_trailer function explicitly blocked only nine standard headers: transfer-encoding, content-length, host, cache-control, expect, max-forwards, pragma, range, and te. Any header not explicitly listed in this function was deemed acceptable. This implementation directly violates the principle of fail-safe defaults, as the HTTP specification contains numerous headers with severe security implications that were omitted from this list.

Once a trailer header bypassed the denylist check, the library invoked request.set_header(req, field, value). In the Gleam HTTP package, set_header is a destructive operation that replaces any existing header with the same name. It does not append the value or isolate the trailer metadata into a separate namespace.

Because of this design, the web server processes the initial request headers, establishes the request context, and then subsequently parses the chunked body. When the parser reaches the trailer section, it systematically overwrites the previously established headers with any attacker-supplied values that bypass the flawed denylist. The resulting manipulated request object is then passed to the user-defined application handlers.

Code Analysis

An examination of the vulnerable code reveals the exact mechanism of the bypass. The initial implementation relied on pattern matching against a hardcoded list of forbidden strings. This approach required the maintainers to exhaustively enumerate every standard and non-standard header that could influence application behavior.

fn is_forbidden_trailer(field: String) -> Bool {
  case string.lowercase(field) {
    "transfer-encoding"
    | "content-length"
    | "host"
    | "cache-control"
    | "expect"
    | "max-forwards"
    | "pragma"
    | "range"
    | "te" -> True
    _ -> False
  }
}

The fix, introduced in commit 94ab6e7bf7293e987ae98b4daa51ea131c2671ba, replaces the denylist with a strict allowlist. The maintainers discarded the is_forbidden_trailer function and implemented is_allowed_trailer. This forces a positive security model where only explicitly permitted metadata headers are merged into the main request object.

fn is_allowed_trailer(field: String) -> Bool {
  case field {
    "server-timing" | "content-digest" | "repr-digest" -> True
    _ -> False
  }
}

The patched logic restricts trailer merging to exactly three low-risk headers. These headers are exclusively used for diagnostic timing or payload integrity verification. By explicitly dropping all other trailer fields, the parser successfully isolates the primary request context from any trailing data, neutralizing the injection vector.

Exploitation Methodology

Exploiting this vulnerability requires sending a carefully structured HTTP request using chunked transfer encoding. The attacker must first declare their intention to send a specific trailer header by including the Trailer header in the initial request block. The HTTP specification mandates this declaration, and many parsers require it to correctly process trailing fields.

The attacker constructs the payload by dividing the request body into chunks. The sensitive header target, such as Authorization, is transmitted after the zero-length chunk that signals the end of the HTTP body. The network transmission proceeds in a single TCP stream, but the parser processes the payload sequentially.

POST /api/admin-action HTTP/1.1
Host: target.example.com
Transfer-Encoding: chunked
Trailer: Authorization
Content-Type: application/json
 
11
{"action":"drop"}
0
Authorization: Bearer admin_token_here
 

> [!NOTE] > The trailing line breaks after the injected header are critical. The server must recognize the end of the trailer section to complete the parsing operation and forward the request to the application layer.

When the ewe server parses this transmission, it initially sees no Authorization header or a legitimate, low-privileged one. As it consumes the chunked body, it reaches the 0 chunk and begins parsing the trailers. The parser encounters the Authorization header, passes it through the incomplete denylist, and calls set_header. The application logic subsequently evaluates the attacker-supplied admin_token_here as the definitive authentication context.

Impact Assessment

The impact of this vulnerability is inherently contextual, dictated by the security posture of the downstream application. However, because the vulnerability allows arbitrary manipulation of primary request headers, the theoretical impact floor is high. Applications that rely on header values for critical state management are severely compromised.

The most prominent risk is authentication bypass. If an application uses bearer tokens or session IDs passed via headers, an attacker can supply an unauthenticated request initially, satisfying edge-level checks, and then inject a privileged token in the trailer. This effectively subverts identity verification controls operating before the full request body is parsed.

Another significant risk vector involves IP spoofing and rate-limit evasion. Load balancers and reverse proxies typically append metadata headers like X-Forwarded-For or X-Real-IP to identify the originating client. By injecting these headers in the trailer section, an attacker can overwrite the values provided by the proxy infrastructure. This allows the attacker to mimic internal network traffic or rotate apparent IP addresses to bypass volumetric defenses.

The severity is amplified by the fact that this exploitation occurs pre-routing. The malicious modifications happen entirely within the internal ewe HTTP parser before any application-level middleware or business logic is executed. Developers auditing their application code would see no obvious flaws, as the injected headers appear completely indistinguishable from legitimate client input.

Remediation and Mitigation

The definitive remediation for this vulnerability is upgrading the ewe library to version 3.0.5 or later. The patch completely removes the vulnerable denylist implementation and substitutes a strict allowlist. This positive security model prevents any arbitrary header from being processed in the trailer section, fundamentally closing the attack vector.

For systems where immediate patching is not technically feasible, operators must implement compensating controls at the network edge. Reverse proxies or Web Application Firewalls (WAFs) can be configured to strip the Trailer header from incoming requests. Alternatively, edge infrastructure can be configured to reject chunked HTTP requests entirely if the application API does not require streaming data ingest.

Developers using ewe should systematically review their dependency trees to ensure the vulnerable package version is not transitively included. Verification involves checking the gleam.toml manifest file and confirming that the resolution lockfile enforces the fixed version. Post-upgrade, no application code modifications are required, as the fix operates transparently within the library's internal parser.

Official Patches

eweOfficial Release v3.0.5 containing the fix

Fix Analysis (2)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected Systems

ewe web server libraryGleam ecosystemErlang ecosystem

Affected Versions Detail

Product
Affected Versions
Fixed Version
ewe
vshakitskiy
< 3.0.53.0.5
AttributeDetail
CWE IDCWE-184
Attack VectorNetwork
CVSS v3.1 Score6.5
ImpactHeader Injection / Authentication Bypass
Exploit Statuspoc
CISA KEVFalse

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1550Use Alternate Authentication Material
Defense Evasion
CWE-184
Incomplete List of Disallowed Inputs

The product relies on a list of inputs that are not allowed, but the list is incomplete, allowing an attacker to bypass intended restrictions.

Vulnerability Timeline

Initial trailer handling logic introduced with vulnerable denylist.
2025-08-31
Initial reports of infinite loops in trailer handling led to vulnerability discovery.
2026-03-13
Vulnerability addressed by implementing a strict allowlist (Commit 94ab6e7b).
2026-03-14
v3.0.5 released.
2026-03-14
GHSA-9W88-79F8-M3VP advisory published.
2026-03-14

References & Sources

  • [1]GitHub Advisory: GHSA-9W88-79F8-M3VP
  • [2]ewe Fix Commit: Strict Allowlist
  • [3]ewe Initial Commit: Insecure Denylist

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2024-29203
4.3

CVE-2024-29203: Client-Side Cross-Site Scripting via Unsandboxed Iframes and Legacy Embed Elements in TinyMCE

CVE-2024-29203 identifies a cross-site scripting (XSS) vulnerability in the content ingestion and parsing mechanics of TinyMCE rich text editor. Due to a failure to enforce sandbox attributes on dynamic iframe elements and safely handle legacy embed objects, unauthenticated attackers can inject malicious elements that execute scripts within the context of the parent application session.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 3 hours ago•CVE-2026-9277
8.1

CVE-2026-9277: OS Command Injection in shell-quote via Object-Token Line Terminator Parsing Defect

A technical breakdown of the OS command injection vulnerability in the shell-quote NPM package (CVE-2026-9277 / GHSA-w7jw-789q-3m8p). The bug resides in the character-by-character backslash-escaping logic applied to the .op field of object-tokens within the quote() function, which fails to match and escape line terminators due to a regex matching oversight in JavaScript. This allows unauthenticated remote attackers to execute arbitrary shell commands if they can control inputs processed by this library.

Alon Barad
Alon Barad
7 views•6 min read
•about 5 hours ago•CVE-2026-11645
8.8

CVE-2026-11645: Out-of-Bounds Memory Access in Google Chrome V8 Engine

A high-severity memory corruption vulnerability exists in the V8 JavaScript engine of Google Chrome before versions 149.0.7827.102/103. The flaw arises from an incorrect bounds-check elimination during JIT compilation by the TurboFan optimizer, allowing remote attackers to achieve out-of-bounds read and write access inside the sandboxed renderer process.

Amit Schendel
Amit Schendel
20 views•6 min read
•about 13 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
65 views•6 min read
•1 day ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read