{"id":"CVE-2026-62269","aliases":["CVE-2026-62269","EEF-CVE-2026-62269","GHSA-96q9-mcc7-hqj8"],"related":[],"kind":"vulnerability","state":"published","title":"S3 object key query-string injection and truncation via unencoded reserved characters in ex_aws","summary":"Improper Encoding or Escaping of Output vulnerability in ex_aws (S3 request URL construction).\n\nThis vulnerability is associated with program files lib/ex_aws/request/url.ex and program routines ExAws.Request.Url.build/2, ExAws.Request.Url.sanitize/2 and ExAws.Request.Url.get_path/2.\n\nex_aws does not percent-encode reserved characters in S3 object keys when it assembles the request URL. A literal ? in an object key survives unencoded: build/2 inserts the operation path verbatim and URI.to_string/1 emits it without encoding, and sanitize/2 then splits the flattened URL on the first ?, treating everything after it as the query string. Because the split runs before uri_encode is applied to the path, the ? is never neutralized, and the recovered query is re-inserted without any encoding.\n\nAn attacker who controls part of an object key (for example a download or upload keyed by a user-supplied filename) can therefore truncate the key past application-appended suffixes, causing the request to address a different object than the application intended, and can inject live S3 sub-resource operations (such as ?acl, ?tagging or ?versions) into the request. The manipulated URL is signed and transmitted normally, so the tampering is authorized like any legitimate request.\n\nThis issue affects ex_aws: from 2.1.2 before 2.8.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Improper Encoding or Escaping of Output vulnerability in ex_aws (S3 request URL construction).\n\nThis vulnerability is associated with program files lib/ex_aws/request/url.ex and program routines ExAws.Request.Url.build/2, ExAws.Request.Url.sanitize/2 and ExAws.Request.Url.get_path/2.\n\nex_aws does not percent-encode reserved characters in S3 object keys when it assembles the request URL. A literal ? in an object key survives unencoded: build/2 inserts the operation path verbatim and URI.to_string/1 emits it without encoding, and sanitize/2 then splits the flattened URL on the first ?, treating everything after it as the query string. Because the split runs before uri_encode is applied to the path, the ? is never neutralized, and the recovered query is re-inserted without any encoding.\n\nAn attacker who controls part of an object key (for example a download or upload keyed by a user-supplied filename) can therefore truncate the key past application-appended suffixes, causing the request to address a different object than the application intended, and can inject live S3 sub-resource operations (such as ?acl, ?tagging or ?versions) into the request. The manipulated URL is signed and transmitted normally, so the tampering is authorized like any legitimate request.\n\nThis issue affects ex_aws: from 2.1.2 before 2.8.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nImproper Encoding or Escaping of Output vulnerability in ex_aws (S3 request URL construction).\n\nThis vulnerability is associated with program files `lib/ex_aws/request/url.ex` and program routines `ExAws.Request.Url.build/2`, `ExAws.Request.Url.sanitize/2` and `ExAws.Request.Url.get_path/2`.\n\nex_aws does not percent-encode reserved characters in S3 object keys when it assembles the request URL. A literal `?` in an object key survives unencoded: `build/2` inserts the operation path verbatim and `URI.to_string/1` emits it without encoding, and `sanitize/2` then splits the flattened URL on the first `?`, treating everything after it as the query string. Because the split runs before `uri_encode` is applied to the path, the `?` is never neutralized, and the recovered query is re-inserted without any encoding.\n\nAn attacker who controls part of an object key (for example a download or upload keyed by a user-supplied filename) can therefore truncate the key past application-appended suffixes, causing the request to address a different object than the application intended, and can inject live S3 sub-resource operations (such as `?acl`, `?tagging` or `?versions`) into the request. The manipulated URL is signed and transmitted normally, so the tampering is authorized like any legitimate request.\n\nThis issue affects ex_aws: from 2.1.2 before 2.8.0.\n\n## Details\n\n**1. URL assembly.** `ExAws.Request.Url.build/2` inserts the operation path (bucket and object key) verbatim, and `URI.to_string/1` emits it without percent-encoding. A literal `?` in the object key passes straight into the flattened URL string.\n\n**2. Path/query split.** For S3, `sanitize/2` recovers the path and query by splitting that string on the first `?`. `get_path/2` keeps only the portion before the `?` as the path and runs it through `uri_encode`. Everything after the `?` becomes the query string and is re-inserted without any encoding.\n\n**3. Signing and transmission.** Because the split happens before `uri_encode` runs, the path encoder never sees the `?`. The resulting request is signed and sent as built:\n\n- the key `report.pdf?acl` is sent as `GET /report.pdf?acl`, promoting `?acl` from key bytes into a live S3 sub-resource parameter;\n- the key `secret?<suffix>` loses everything after the `?` (for example an application-appended `.json` extension), so the request addresses a different object than the one the caller constructed.\n\n## Proof of concept\n\n1. An application lets users download text exports and builds the object key from a user-supplied filename, appending the extension itself: `key = filename <> \".txt\"`.\n2. It fetches the object through the public entry point: `ExAws.S3.get_object(bucket, key) |> ExAws.request(config)`.\n3. A benign filename `export` yields the key `export.txt` and the request `GET /victim-bucket/export.txt`.\n4. The attacker supplies the filename `export.dump?`, producing the key `export.dump?.txt`.\n5. ex_aws sends `GET /victim-bucket/export.dump` with the query string `.txt`: the application's `.txt` suffix is moved into the query and dropped from the key.\n6. S3 returns the bytes of `export.dump`, an object of a different type the application never meant to expose.\n\n## Workarounds\n\nBefore constructing an S3 operation, percent-encode reserved characters in the object key (or reject keys that contain `?` or `#`) so that no reserved character reaches the URL builder unencoded.\n\n## Configurations\n\nThe vulnerability is reachable only on the Amazon S3 request path (the code guarded by service `\"s3\"`), which applications typically issue through the ex_aws_s3 package. The application must construct S3 operations whose object keys derive from untrusted input (for example a download or upload keyed by a user-supplied filename or identifier). Requests to other AWS services, and S3 operations built entirely from trusted keys, do not reach the vulnerable behavior.","format":"markdown","source":"eef"}],"published":"2026-11-24T11:40:27.176Z","modified":"2026-12-01T17:17:40.007Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"}],"cwes":["CWE-116"],"affected":[{"ranges":[{"type":"semver","introduced":"2.1.2","fixed":"2.8.0","status":"affected"}],"vendor":"ex-aws","product":"ex_aws","package":"ex_aws","cpe":"cpe:2.3:a:ex-aws:ex_aws:*:*:*:*:*:*:*:*","repo":"https://github.com/ex-aws/ex_aws","source":"cvelist"},{"ranges":[{"type":"git","introduced":"ecd51b1965909119ee597d6c0783334e30e59e58","fixed":"963fcc0948102608c6796959e7a0d84f37d84dce","status":"affected"}],"vendor":"ex-aws","product":"ex_aws","package":"ex-aws/ex_aws","cpe":"cpe:2.3:a:ex-aws:ex_aws:*:*:*:*:*:*:*:*","repo":"https://github.com/ex-aws/ex_aws","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.1.2","status":"affected","fixed":"2.8.0"}],"ecosystem":"Hex","package":"ex_aws","purl":"pkg:hex/ex_aws","source":"eef"},{"ranges":[{"type":"git","introduced":"ecd51b1965909119ee597d6c0783334e30e59e58","status":"affected","fixed":"963fcc0948102608c6796959e7a0d84f37d84dce"}],"repo":"https://github.com/ex-aws/ex_aws","source":"eef"}],"references":[{"url":"https://github.com/ex-aws/ex_aws/security/advisories/GHSA-96q9-mcc7-hqj8","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-62269.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-62269","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ex-aws/ex_aws/commit/ecd51b1965909119ee597d6c0783334e30e59e58","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/ex-aws/ex_aws/commit/963fcc0948102608c6796959e7a0d84f37d84dce","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/ex_aws","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Bernard Duggan"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-12-01T16:30:11.126Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-62269","url":"https://www.cve.org/CVERecord?id=CVE-2026-62269","licence":"CVE Terms of Use","modified":"2026-12-01T16:53:06.984Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-62269","url":"https://osv.dev/vulnerability/EEF-CVE-2026-62269","licence":"CC-BY-4.0","modified":"2026-11-26T17:23:07.430Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-62269","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62269","licence":"Public domain","modified":"2026-12-01T17:17:40.007Z"}],"updatedAt":"2026-12-01T17:32:13.271Z","epss":{"score":0.00223,"percentile":0.138,"date":"2026-12-01T12:00:22.000Z"}}