{"id":"CVE-2026-59697","aliases":["EEF-CVE-2026-59697","GHSA-mww9-g5mj-j664"],"title":"IMDSv2 metadata token request follows HTTP redirects in ex_aws","originalDescription":"Server-Side Request Forgery (SSRF) vulnerability in ex_aws (instance metadata token provider).\n\nThis 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.\n\nex_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.\n\nThis issue affects ex_aws: from 2.3.0 before 2.8.0.","severity":{"cvss":7.6,"vector":"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","label":"high"},"exploitation":{"kev":null,"epss":{"score":0.00312,"percentile":0.16561},"exploitDb":null},"affected":[{"ecosystem":"Hex","name":"ex_aws","range":">=2.3.0, <2.8.0","fixed":"2.8.0"},{"ecosystem":"unknown","name":"ex-aws/ex_aws","range":">=4d7923c16f613cc2bade2ed325d444bba0bc7234, <9fcc3605c7a0ecf8e205a72c50de3ced72befed0","fixed":"9fcc3605c7a0ecf8e205a72c50de3ced72befed0"},{"ecosystem":"unknown","name":"ex_aws","range":">=2.3.0, <2.8.0","fixed":"2.8.0"}],"references":[{"url":"https://github.com/ex-aws/ex_aws/security/advisories/GHSA-mww9-g5mj-j664","type":"vendor-advisory"},{"url":"https://cna.erlef.org/cves/CVE-2026-59697.html","type":"related"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-59697","type":"related"},{"url":"https://github.com/ex-aws/ex_aws/commit/4d7923c16f613cc2bade2ed325d444bba0bc7234","type":"related"},{"url":"https://github.com/ex-aws/ex_aws/commit/9fcc3605c7a0ecf8e205a72c50de3ced72befed0","type":"patch"},{"url":"https://hex.pm/packages/ex_aws","type":"package"},{"url":"https://github.com","type":"web"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59697.json","type":"advisory"},{"url":"https://github.com/ex-aws/ex_aws","type":"package"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59697","type":"advisory"},{"url":"https://repo.hex.pm","type":"web"}],"sources":[{"name":"nvd","at":"2026-11-24T19:35:15.258Z","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59697","license":"NVD terms of use","firstSeenAt":"2026-11-24T12:24:16.122Z"},{"name":"osv","at":"2026-11-25T21:33:06.256Z","url":"https://osv.dev/vulnerability/CVE-2026-59697","license":"CC-BY 4.0","firstSeenAt":"2026-11-24T11:51:37.614Z"},{"name":"cvelistV5","at":"2026-11-28T17:45:17.597Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-59697","license":"CVE Terms of Use","firstSeenAt":"2026-11-24T11:48:32.499Z"}],"firstSeenAt":"2026-11-24T11:48:32.499Z","publishedAt":"2026-11-24T11:43:17.078Z","modifiedAt":"2026-11-25T21:02:30.658Z"}