CVE-2026-65621 in ex_aws_s3info

Summary

by MITRE • 11/24/2026

ex_aws_s3 builds x-amz-meta-* request headers by interpolating user-supplied object metadata directly into header names and values without any validation. In ExAws.S3.Utils.build_meta_headers/1 (lib/ex_aws/s3/utils.ex), each :meta entry is turned into a header as {"x-amz-meta-#{k}", v} with no check for carriage return (CR), line feed (LF), or other illegal header bytes.

Object metadata is routinely derived from end-user input (for example an upload service that lets users attach a comment or label to an object). When such input reaches ExAws.S3.put_object/4 or any other operation accepting the :meta option, a value containing CR/LF is carried unchanged into the outbound header list. If the configured HTTP adapter does not neutralize header values before writing them to the socket, the embedded CRLF starts a new header line, allowing an attacker to inject arbitrary headers into (or split) the HTTP request the library sends to the S3 endpoint. This is an HTTP header (CRLF) injection leading to HTTP request splitting. The practical impact depends on the HTTP adapter, and no authentication is required beyond the ability to influence object metadata.

This issue affects ex_aws_s3: from 2.0.0 before 2.6.0.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/24/2026

The vulnerability identified in ExAws.S3 prior to version 2.6.0 constitutes a critical HTTP header injection flaw rooted in the improper handling of user-supplied metadata during object creation operations within the Amazon S3 integration library for Elixir. The core technical deficiency resides in the build_meta_headers function located in lib/ex_aws/s3/utils.ex, which processes key-value pairs designated as object metadata by directly interpolating them into HTTP header names and values without performing any sanitization or validation checks. Specifically, when constructing headers prefixed with x-amz-meta-, the library concatenates user-provided keys and values directly into the string structure {"x-amz-meta-#{k}", v}. This approach fails to filter out carriage return characters (CR) and line feed characters (LF), which are strictly prohibited within HTTP header fields according to RFC 7230. Because object metadata is frequently derived from direct end-user input, such as comments or labels attached during file uploads, this design flaw creates a direct vector for malicious actors who can control the content of these metadata fields.

The operational impact of this vulnerability stems from the ability of an attacker to inject arbitrary HTTP headers into requests sent to the S3 endpoint through CRLF injection techniques. When a value containing embedded CR and LF characters is passed as part of the metadata, it breaks out of the intended header field boundary. If the underlying HTTP adapter configured for ExAws does not neutralize these control characters before writing data to the network socket, the injected line feeds cause the parser on either side or within intermediate proxies to interpret subsequent content as new headers rather than continuation of the current one. This leads to HTTP request splitting, a severe class of vulnerability where an attacker can manipulate the structure of the outgoing HTTP request. Depending on the specific configuration and behavior of the HTTP adapter in use, this could allow for header injection that modifies authentication tokens, alters cache control directives, or potentially facilitates server-side request forgery if combined with other vulnerabilities. The severity is compounded by the fact that no additional authentication beyond the ability to influence object metadata is required to exploit this flaw, making it accessible to any user who can upload objects with controlled metadata fields.

From a classification perspective, this vulnerability aligns closely with CWE-74, which describes injection flaws where untrusted data is used in command or header construction without proper neutralization of special elements. Furthermore, the exploitation technique maps directly to ATT&CK T1559, specifically subtechnique T1559.002 for Inter-Process Communication via Header Injection, although in this context it manifests as HTTP request manipulation rather than pure inter-process communication. The lack of input validation represents a fundamental failure in secure coding practices regarding the handling of external data sources that interact with network protocols. Organizations relying on versions of ExAws.S3 from 2.0.0 up to but not including 2.6.0 are exposed to this risk, particularly those applications where users can supply metadata during object uploads or updates.

To mitigate this vulnerability, immediate action is required to upgrade the ex_aws_s3 dependency to version 2.6.0 or later, which includes patches for input validation in header construction routines. In environments where upgrading is not immediately feasible, developers should implement strict sanitization of all metadata values before they are passed to ExAws.S3 functions such as put_object/4. This involves filtering out carriage returns and line feeds from any user-supplied strings intended for object metadata. Additionally, reviewing the configuration of the HTTP adapter ensures that it adheres strictly to RFC standards by rejecting or escaping invalid characters in header fields. Implementing a centralized validation layer for all S3 metadata inputs can provide defense-in-depth against similar injection attempts across different parts of the application stack. Regular security audits focusing on how external data interacts with protocol-specific libraries are essential to prevent recurrence of such issues.

Responsible

EEF

Reservation

07/22/2026

Disclosure

11/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00331

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!