Ex AWS bucket escape via path traversal in S3 keys
Only affects ex_aws 2.1.7 before 2.8.0 in the default path-style S3 configuration, where virtual_host is not set to true. Fixed in 2.8.0.
- Exploited
- No known exploitation
- Fix
- Fixed in 2.8.0
- Who is exposed
- Specific setups only
Summary
A local attacker who controls an S3 object key can, without logging in or taking any user action, use `../` segments to escape the intended bucket or key prefix in ex_aws. This can allow reads or writes in other buckets or prefixes, sent with the application's own credentials, depending on what those credentials are permitted to do.
Written by a model
Original description
Relative path traversal in ex_aws allows an attacker who controls an S3 object key to escape the intended bucket or key prefix.
When ex_aws builds a path-style S3 request, ExAws.Operation.S3.add_bucket_to_path/2 in lib/ex_aws/operation/s3.ex joins the bucket name and the object key into a single path string and then normalizes it, collapsing . and .. segments the way a filesystem path would. Because the bucket is the first segment of the combined string, a leading ../ in the object key pops the bucket off the path. With bucket mybucket and a key of ../victim/secret.txt, the combined /mybucket/../victim/secret.txt normalizes to /victim/secret.txt, so the request (signed with the application's own credentials) is sent to bucket victim. The same mechanism collapses ../ within a key, defeating any isolation an application enforces by prepending a trusted prefix.
Only the default path-style configuration is affected; requests built with virtual_host: true do not run this normalization. Because S3 treats object keys as opaque and does not resolve .. itself, the client-side normalization introduces a traversal that would not otherwise exist. Any application that derives an S3 object key from untrusted input and relies on the bucket, or a key prefix, as a tenant or trust boundary is exposed to cross-bucket or cross-prefix read and write, depending on the operation and the credentials' permissions.
This issue affects ex_aws: from 2.1.7 before 2.8.0.
Who should check
Teams running ex_aws 2.1.7 up to 2.8.0 with the default path-style S3 configuration that build S3 object keys from untrusted input.
“The vulnerability is only exposed in the default path-style S3 configuration”
What to do
Check whether your setup matches what the bug needs.
Default path-style S3 configuration (virtual_host not set to true). ex_aws versions from 2.1.7 before 2.8.0.Upgrade to a fixed version: 2.8.0.
Workaround: Configure the ex_aws S3 client with virtual_host: true, which builds the request without the client-side path normalization.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-59698 (ex_aws normalizes .. in S3 object keys client-side, allowing bucket or key-prefix escape), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-59698 (entry last updated 2026-11-24):
Affected:
- Hex package ex_aws: from 2.1.7, fixed in 2.8.0
- ex-aws ex_aws: version range not reported
Fixed versions: 2.8.0.
Conditions (all must be true for the bug to be hit):
- Default path-style S3 configuration (virtual_host not set to true). (source: https://cna.erlef.org/cves/CVE-2026-59698.html)
- ex_aws versions from 2.1.7 before 2.8.0. (source: https://cna.erlef.org/cves/CVE-2026-59698.html)
Setup: the bug is reachable in a default setup; no special feature or setting is needed.
Attacker needs: local access, no login, no user action.
Workaround: Configure the ex_aws S3 client with virtual_host: true, which builds the request without the client-side path normalization. (source: https://cna.erlef.org/cves/CVE-2026-59698.html)
CISA KEV: CVE-2026-59698 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-59698 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Packages (Hex): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/ex-aws/ex_aws/security/advisories/GHSA-hrw3-2h5r-fhxx
- https://github.com/ex-aws/ex_aws/commit/b1116f9f92a8ec1f7f2f3f692bd1c5cacaddf6fd
- https://cna.erlef.org/cves/CVE-2026-59698.html
- https://osv.dev/vulnerability/EEF-CVE-2026-59698
- https://github.com/ex-aws/ex_aws/commit/557d3438a7e739a25c1ccc1876a5b636793f20ba
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-59698
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-59698"}.Affected versions
- ex_awsFrom 2.1.7 · fixed in 2.8.0
- ex-aws/ex_awsVersion range not reported
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure5/25Specific setups only
- Reach10/20Affects Hex packages
- Severity7.4/10CVSS 7.4
- No patch0/5No signal
What would change the score
- Would score about 72 if added to CISA KEV
- Would score about 67 if CISA's SSVC rates exploitation active
- Would score about 32 if CISA's SSVC rates it automatable
Timeline
- CVE published
- First seen by cve.now
Evidence 7
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · ex-aws/ex_aws · Advisory GHSA-hrw3-2h5r-fhxx |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-59698 |
| Record | NVD · CVE-2026-59698 |
| Other links 4 | |
| Patch | GitHub · ex-aws/ex_aws · Commit b1116f9f |
| Repository | GitHub · ex-aws/ex_aws · Commit 557d3438 |
| Link | cna.erlef.org · cves/CVE-2026-59698.html |
| Link | osv.dev · vulnerability/EEF-CVE-2026-59698 |
Questions about CVE-2026-59698
Is CVE-2026-59698 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
ex_aws normalizes ".." segments in S3 object keys on the client side. An attacker who controls an object key can use this to escape the intended bucket or key prefix and read or write data in other buckets or prefixes using the application's credentials.
Source: cna.erlef.org
Which versions are affected by CVE-2026-59698?
ex_aws (Hex): from 2.1.7 before 2.8.0.
Source: cve.now feed data
Am I affected, and how do I check?
The issue affects ex_aws from 2.1.7 before 2.8.0, and only in the default path-style S3 configuration. To check, look at the ex_aws version in your mix.lock or dependency list, and check whether virtual_host is set to true in your S3 client configuration.
Source: cna.erlef.org
How do I fix CVE-2026-59698?
Upgrade ex_aws to 2.8.0 or later, which contains the fix. If you cannot upgrade yet, configure the ex_aws S3 client with virtual_host: true, which builds the request without the client-side path normalization.
Source: cna.erlef.org
Related
- CVE-2026-59697IMDSv2 metadata token request follows HTTP redirects in ex_aws
- CVE-2026-120720S3 bucket name controls the request host in ex_aws virtual-host requests
- CVE-2026-62269S3 object key query-string injection and truncation via unencoded reserved characters in ex_aws
- CVE-2026-47074ex_aws_sns SigningCertURL not validated in verify_message/1
- CVE-2026-63583XML injection in ExAws.S3.Utils.build_lifecycle_rule/1 in ex_aws_s3
- CVE-2026-63581ex_aws_s3 XML injection in bucket-configuration builders
No corrections so far. Something wrong on this page? Report an error.