# CVE-2026-59697: IMDSv2 metadata token request follows HTTP redirects in ex_aws

- Severity: High 7.6 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.31%, higher than 26% of CVEs (2026-12-02)
- Published: 2026-11-24T11:43:17.078Z
- Modified: 2026-12-01T17:17:39.463Z
- Also known as: EEF-CVE-2026-59697, GHSA-mww9-g5mj-j664
- Weaknesses: CWE-918
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: EEF

## 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.

(As written by CVE List.)

## Affected

- ex_aws: from 2.3.0 before 2.8.0
- ex-aws/ex_aws: from 4d7923c16f613cc2bade2ed325d444bba0bc7234 before 9fcc3605c7a0ecf8e205a72c50de3ced72befed0
- ex_aws (Hex): from 2.3.0 before 2.8.0
- https://github.com/ex-aws/ex_aws: from 4d7923c16f613cc2bade2ed325d444bba0bc7234 before 9fcc3605c7a0ecf8e205a72c50de3ced72befed0

## Every score

- EEF: CVSS:4.0 7.6 High `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/ex-aws/ex_aws/security/advisories/GHSA-mww9-g5mj-j664> (advisory, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-59697.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-59697> (related)
- <https://github.com/ex-aws/ex_aws/commit/4d7923c16f613cc2bade2ed325d444bba0bc7234> (related, web)
- <https://github.com/ex-aws/ex_aws/commit/9fcc3605c7a0ecf8e205a72c50de3ced72befed0> (fix, patch)
- <https://hex.pm/packages/ex_aws> (package)

## Sources

- CVE List: [CVE-2026-59697](https://www.cve.org/CVERecord?id=CVE-2026-59697), CVE Terms of Use, modified 2026-12-01
- Erlang Ecosystem Foundation: [EEF-CVE-2026-59697](https://osv.dev/vulnerability/EEF-CVE-2026-59697), CC-BY-4.0, modified 2026-11-26
- NVD: [CVE-2026-59697](https://nvd.nist.gov/vuln/detail/CVE-2026-59697), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-59697 · Whole record: https://cve.day/CVE-2026-59697.json · Rebuilt by cve.day 2026-12-01T17:32:13.398Z
