All vulnerabilities

Hex

CVE-2026-59697

IMDSv2 metadata token request follows HTTP redirects in ex_aws

Severity
High 7.6
Published
24 Nov 2026
Last changed
24 Nov 2026
Added to UpHeron
24 Nov 2026
Fixed in
2.8.0
Weakness
Server-side request forgery (CWE-918)
Attack
From the same local network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read data · Change data
CVSS 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
Sources
CVE Program

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.

From the CVE Program. Shortened; the full text is there.

Affected software

SoftwareAffected versions
ex_awsHex · osv:Hex:ex_aws
  • From 2.3.0 before 2.8.0

About ex_aws

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-59697