# CVE-2026-59697: IMDSv2 metadata token request follows HTTP redirects in ex\_aws

- **Severity:** HIGH 7.6
- **CVSS:** 7.6 (v4.0, CNA) `CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: High; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 17, 2026-11-28)
- **CWE:** CWE-918
- **Published:** 2026-11-24T11:43:17.078Z
- **Modified:** 2026-11-24T19:12:16.707Z

## Who should check

- Anyone running ex-aws ex\_aws \>= 2.3.0, \< 2.8.0
- Anyone running ex-aws ex\_aws \>= 4d7923c16f613cc2bade2ed325d444bba0bc7234, \< 9fcc3605c7a0ecf8e205a72c50de3ced72befed0

## Description

Server-Side Request Forgery (SSRF) vulnerability in ex\_aws (instance metadata token provider).

This vulnerability is associated with program files lib/ex\_aws/instance\_meta\_token\_provider.ex and program routines ExAws.InstanceMetaTokenProvider.request\_token/1 and ExAws.InstanceMetaTokenProvider.get/1.

ex\_aws requests its IMDSv2 session token from the link-local metadata endpoint (http://169.254.169.254/latest/api/token) with HTTP redirect following enabled. Because the token request follows 3xx redirects and does not restrict the redirect target to the link-local range, an attacker who can influence the response to the metadata request (for example an on-segment neighbor spoofing the link-local address) can answer with a redirect to an arbitrary host. The library follows the redirect and accepts the arbitrary host's response body as the IMDSv2 session token, caching it and sending it as the x-aws-ec2-metadata-token header on every subsequent metadata and credential request.

This issue affects ex\_aws: from 2.3.0 before 2.8.0.

## Affected and fixed versions

- ex-aws ex\_aws: \>= 2.3.0, \< 2.8.0 (cvelist)
- ex-aws ex\_aws: \>= 4d7923c16f613cc2bade2ed325d444bba0bc7234, \< 9fcc3605c7a0ecf8e205a72c50de3ced72befed0 (cvelist)

## Mitigation

- Upgrade ex\_aws to 2.8.0 or later.
- Upgrade ex\_aws to 9fcc3605c7a0ecf8e205a72c50de3ced72befed0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-59697. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-59697.md
Affected: ex-aws ex_aws >= 2.3.0, < 2.8.0; ex-aws ex_aws >= 4d7923c16f613cc2bade2ed325d444bba0bc7234, < 9fcc3605c7a0ecf8e205a72c50de3ced72befed0
Fixed in: ex-aws ex_aws 2.8.0, ex-aws ex_aws 9fcc3605c7a0ecf8e205a72c50de3ced72befed0

Steps:
1. Search this machine and project for ex-aws ex_aws: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-59697 being exploited?

There is no confirmed exploitation: CVE-2026-59697 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-59697?

High: CVSS 7.6 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-59697?

ex-aws ex\_aws \>= 2.3.0, \< 2.8.0; ex-aws ex\_aws \>= 4d7923c16f613cc2bade2ed325d444bba0bc7234, \< 9fcc3605c7a0ecf8e205a72c50de3ced72befed0.

### Is there a fix for CVE-2026-59697?

Yes. Fixed in ex-aws ex\_aws 2.8.0, ex-aws ex\_aws 9fcc3605c7a0ecf8e205a72c50de3ced72befed0. Upgrade ex\_aws to 2.8.0 or later. Upgrade ex\_aws to 9fcc3605c7a0ecf8e205a72c50de3ced72befed0 or later.

### How do I check if I'm affected by CVE-2026-59697?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/ex-aws/ex_aws/security/advisories/GHSA-mww9-g5mj-j664>
- patch: <https://github.com/ex-aws/ex_aws/commit/4d7923c16f613cc2bade2ed325d444bba0bc7234>
- patch: <https://github.com/ex-aws/ex_aws/commit/9fcc3605c7a0ecf8e205a72c50de3ced72befed0>
- other: <https://cna.erlef.org/cves/CVE-2026-59697.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-59697>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-59697>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-59697> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-59697>
