Ex AWS server-side request forgery in S3 virtual-host requests
Only affects ex_aws 2.1.7 before 2.8.0 clients configured with virtual_host: true that pass an attacker-influenceable bucket name. Fixed in 2.8.0.
- Exploited
- No known exploitation
- Fix
- Fixed in 2.8.0
- Who is exposed
- Specific setups only
Summary
A flaw in ex_aws lets an attacker who controls an S3 bucket name redirect the application's signed S3 requests to a host of their choice, exposing upload data, access key IDs, request signatures, and STS session tokens. The attacker can reach it locally, without logging in, and can also control the responses the application parses.
Written by a model
Original description
Server-Side Request Forgery (SSRF) vulnerability in ex-aws ex_aws allows an attacker who controls an S3 bucket name to send the application's signed S3 requests to a host of their choice.
With virtual_host: true, ExAws.Operation.S3.add_bucket_to_path/2 in lib/ex_aws/operation/s3.ex builds the request hostname from the bucket name and the configured host without checking the bucket name. A bucket such as attacker.example/x? turns the request URL into attacker.example/
This issue affects ex_aws: from 2.1.7 before 2.8.0.
Who should check
Teams running ex_aws 2.1.7 through 2.8.0 with S3 virtual_host: true that pass per-tenant or user-supplied bucket names, such as multi-tenant upload services.
Not fixed by: Upgrading alone does not stop hostnames used with bucket_as_host: true.
“Reachable only when the S3 client is configured with virtual_host: true and the application passes a bucket name an attacker can influence”
What to do
Check whether your setup matches what the bug needs.
S3 client configured with virtual_host: true Application passes a bucket name an attacker can influence, such as per-tenant or user-supplied buckets ex_aws versions from 2.1.7 before 2.8.0Upgrade to a fixed version: 2.8.0.
Workaround: With bucket_as_host: true and bucket names not fully controlled, set the bucket_as_host_allowlist S3 config option to the list of trusted hostnames.
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-120720 (S3 bucket name controls the request host in ex_aws virtual-host requests), 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-120720 (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):
- S3 client configured with virtual_host: true (source: https://www.cve.org/CVERecord?id=CVE-2026-120720)
- Application passes a bucket name an attacker can influence, such as per-tenant or user-supplied buckets (source: https://www.cve.org/CVERecord?id=CVE-2026-120720)
- ex_aws versions from 2.1.7 before 2.8.0 (source: https://cna.erlef.org/cves/CVE-2026-120720.html)
Setup: the bug needs a feature or setting that is off by default or uncommon. Check whether each asset has it on.
Attacker needs: local access, no login, no user action.
Workaround: With bucket_as_host: true and bucket names not fully controlled, set the bucket_as_host_allowlist S3 config option to the list of trusted hostnames. (source: https://cna.erlef.org/cves/CVE-2026-120720.html)
CISA KEV: CVE-2026-120720 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-120720 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-rcv9-2jx2-63xh
- https://github.com/ex-aws/ex_aws/commit/a878943be6def16ffbee6bb9e11d90db1dc904f8
- https://cna.erlef.org/cves/CVE-2026-120720.html
- https://osv.dev/vulnerability/EEF-CVE-2026-120720
- https://github.com/ex-aws/ex_aws/commit/557d3438a7e739a25c1ccc1876a5b636793f20ba
- https://www.cve.org/CVERecord?id=CVE-2026-120720
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-120720
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-120720"}.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
- Severity5.9/10CVSS 5.9
- No patch0/5No signal
What would change the score
- Would score about 71 if added to CISA KEV
- Would score about 66 if CISA's SSVC rates exploitation active
- Would score about 31 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-rcv9-2jx2-63xh |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-120720 |
| Record | NVD · CVE-2026-120720 |
| Other links 4 | |
| Patch | GitHub · ex-aws/ex_aws · Commit a878943b |
| Repository | GitHub · ex-aws/ex_aws · Commit 557d3438 |
| Link | cna.erlef.org · cves/CVE-2026-120720.html |
| Link | osv.dev · vulnerability/EEF-CVE-2026-120720 |
Questions about CVE-2026-120720
Is CVE-2026-120720 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?
A bucket name the application passes can redirect its S3 requests to a host the attacker controls. That host receives the signed requests, including upload bodies, the access key id, the request signature and any STS session token, and controls the response the application parses.
Source: cve.org, cna.erlef.org
Which versions are affected by CVE-2026-120720?
ex_aws (Hex): from 2.1.7 before 2.8.0.
Source: cve.now feed data
Am I affected, and how do I check?
ex_aws versions from 2.1.7 before 2.8.0 are affected, but only when the S3 client is configured with virtual_host: true and the application passes a bucket name an attacker can influence, such as per-tenant or user-supplied buckets. Check the ex_aws version in the project's mix.lock or mix deps output, and check the virtual_host setting in the S3 client configuration.
Source: cve.org, cna.erlef.org
How do I fix CVE-2026-120720?
Upgrade ex_aws to 2.8.0 or later, which is the fixed version named in the advisory.
Source: cve.org, cna.erlef.org
Related
- CVE-2026-59697IMDSv2 metadata token request follows HTTP redirects in ex_aws
- CVE-2026-59698ex_aws normalizes .. in S3 object keys client-side, allowing bucket or key-prefix escape
- 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.