CVE-2026-59697
Server-Side Request Forgery (SSRF) vulnerability in ex_aws (instance metadata token provider).
Impact
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.
An attacker can exploit this from the same local network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: high risk of data being read, high risk of data or systems being changed.
Affected products (Ex-aws)
| Product | Affected versions |
|---|---|
| Ex Aws | from 2.3.0 before 2.8.0 from 4d7923c16f613cc2bade2ed325d444bba0bc7234 before 9fcc3605c7a0ecf8e205a72c50de3ced72befed0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/ex-aws/ex_aws/security/advisories/GHSA-mww9-g5mj-j664
- https://cna.erlef.org/cves/CVE-2026-59697.html
- https://osv.dev/vulnerability/EEF-CVE-2026-59697
- https://github.com/ex-aws/ex_aws/commit/4d7923c16f613cc2bade2ed325d444bba0bc7234
- https://github.com/ex-aws/ex_aws/commit/9fcc3605c7a0ecf8e205a72c50de3ced72befed0
- https://github.com/advisories/GHSA-vx85-vcmw-ph24
- https://nvd.nist.gov/vuln/detail/CVE-2026-59697