SEVERITY NOT PROVIDED · CVSS 4.0 EPSS 0.3% · 19th percentile CWE-113

CVE-2026-65621: Unvalidated object metadata in ex_aws_s3 enables HTTP header (CRLF) injection into S3 requests

Published 2026-11-24 · Updated 2026-11-25 · Also known as EEF-CVE-2026-65621, GHSA-5887-vcfr-5ff8

Summary

The ex_aws_s3 package builds x-amz-meta-* request headers by interpolating user-supplied object metadata without validation, enabling HTTP header CRLF injection. Engineering teams using affected versions with metadata derived from untrusted input should update to version 2.6.0.

Who is affected

Deployments using ex_aws_s3 versions 2.0.0 through 2.5.9 are affected when object metadata is derived from untrusted end-user input and the configured HTTP adapter does not neutralize carriage return or line feed characters. This can lead to HTTP request splitting or arbitrary header injection into requests sent to the S3 endpoint. The practical impact heavily depends on whether the underlying HTTP adapter safely sanitizes header values.

Exploitability

The CVSS 4.0 vector indicates local access (AV:L), low attack complexity (AC:L), privileged attack requirements (AT:P), no user interaction required (UI:N), and low impacts to integrity (VI:L) with no confidentiality or availability impact. EPSS is not yet available, and CISA KEV lists no known exploitation.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-25. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Hex ex_aws_s3 >= 2.0.0, < 2.6.0 2.6.0 mix deps.update ex_aws_s3

CVSS 4.0 vector

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Attack vectorLocal
Attack complexityLow
Attack requirementsPresent
Privileges requiredNone
User interactionNone
Confidentiality (vulnerable system)None
Integrity (vulnerable system)Low
Availability (vulnerable system)None
Confidentiality (subsequent systems)None
Integrity (subsequent systems)Low
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

What causes the CRLF injection vulnerability in ex_aws_s3?

The vulnerability is caused by ExAws.S3.Utils.build_meta_headers/1 interpolating user-supplied object metadata directly into header names and values without checking for carriage return or line feed bytes.

Which versions of ex_aws_s3 are affected?

The issue affects ex_aws_s3 from version 2.0.0 before version 2.6.0.

Is exploitation dependent on the HTTP adapter?

Yes. The vulnerability is only fully exploitable when an application uses an HTTP adapter that does not neutralize CR/LF in header values. Adapters like hackney 4.x strip CR/LF by default, whereas adapters that do not perform validation will allow the injected headers through.

Original advisory description
## Summary 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. ## Details **1. Unvalidated header construction.** `ExAws.S3.Utils.build_meta_headers/1` in `lib/ex_aws/s3/utils.ex` turns each `:meta` entry into `{"x-amz-meta-#{k}", v}`. Neither the key nor the value is checked for CR, LF or other illegal header bytes. **2. Untrusted metadata.** Object metadata is routinely populated from end-user input, such as a comment or label attached to an upload. A value like `"legit\r\nX-Injected-By-Attacker: pwned"` reaches the header list unchanged through `ExAws.S3.put_object/4` or any operation taking `:meta`. **3. Header injection.** If the HTTP adapter does not validate header values before writing them to the socket, the embedded CRLF ends the `x-amz-meta-*` line and starts a new one, injecting arbitrary headers into, or splitting, the request sent to S3. The library delegates this safety to the adapter entirely. ## Proof of concept 1. An upload service forwards user-supplied metadata: `ExAws.S3.put_object("victim-bucket", "uploads/file.txt", "hello", meta: [{"comment", value}])`. 2. The attacker sets the value to `legit\r\nX-Injected-By-Attacker: pwned\r\nX-Smuggled: yes`. 3. `build_meta_headers/1` copies it verbatim into the `x-amz-meta-comment` header. 4. With an adapter that does not reject CR/LF, the bytes on the wire contain `X-Injected-By-Attacker: pwned` and `X-Smuggled: yes` as separate header lines. ## Impact This is an HTTP header (CRLF) injection / request-splitting issue. Anyone using `ex_aws_s3` to store objects whose metadata is derived from untrusted input (upload services, multi-tenant file stores, anything exposing object metadata over an HTTP boundary) is affected. The practical impact depends on the configured HTTP adapter: adapters that validate header values will reject or strip the injection, but the library offers no guarantee and performs no validation of its own, so the safety of the request is silently delegated to the HTTP client. ## Workarounds Reject or strip carriage return (CR) and line feed (LF) characters from object metadata keys and values before passing them to ex_aws_s3, or configure an HTTP adapter that neutralizes CR/LF in header values before writing them to the socket (for example hackney 4.x). ## Configurations The vulnerability is only exploitable when an application both populates object `:meta` entries from untrusted input and uses an HTTP adapter that does not neutralize CR/LF in header values before writing them to the socket. The default adapter (hackney 4.x) strips CR/LF from header values, which masks the issue; the library performs no validation of its own and silently delegates safety to the configured HTTP client.

References

Source records: EEF-CVE-2026-65621 (OSV.dev) · EPSS by FIRST, 2026-11-26.