{"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ex-aws:ex_aws:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.ExAws.Operation.S3'"],"packageName":"ex_aws","packageURL":"pkg:hex/ex_aws","product":"ex_aws","programFiles":["lib/ex_aws/operation/s3.ex"],"programRoutines":[{"name":"'Elixir.ExAws.Operation.S3':add_bucket_to_path/2"}],"repo":"https://github.com/ex-aws/ex_aws","vendor":"ex-aws","versions":[{"lessThan":"2.8.0","status":"affected","version":"2.1.7","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ex-aws:ex_aws:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.ExAws.Operation.S3'"],"packageName":"ex-aws/ex_aws","packageURL":"pkg:github/ex-aws/ex_aws","product":"ex_aws","programFiles":["lib/ex_aws/operation/s3.ex"],"programRoutines":[{"name":"'Elixir.ExAws.Operation.S3':add_bucket_to_path/2"}],"repo":"https://github.com/ex-aws/ex_aws","vendor":"ex-aws","versions":[{"lessThan":"b1116f9f92a8ec1f7f2f3f692bd1c5cacaddf6fd","status":"affected","version":"557d3438a7e739a25c1ccc1876a5b636793f20ba","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The vulnerability is only exposed in the default path-style S3 configuration, where ex_aws normalizes the combined bucket and key path. Applications that configure the S3 client with <code>virtual_host: true</code> build the request without this client-side normalization and are not affected.</p>"},{"base64":false,"type":"text/markdown","value":"The vulnerability is only exposed in the default path-style S3 configuration, where ex_aws normalizes the combined bucket and key path. Applications that configure the S3 client with `virtual_host: true` build the request without this client-side normalization and are not affected."}],"value":"The vulnerability is only exposed in the default path-style S3 configuration, where ex_aws normalizes the combined bucket and key path. Applications that configure the S3 client with virtual_host: true build the request without this client-side normalization and are not affected."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ex-aws:ex_aws:*:*:*:*:*:*:*:*","versionEndExcluding":"2.8.0","versionStartIncluding":"2.1.7","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"reporter","value":"Peter Ullrich"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"coordinator","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Bernard Duggan"}],"datePublic":"2026-11-24T11:45:29.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Relative path traversal in ex_aws allows an attacker who controls an S3 object key to escape the intended bucket or key prefix.</p>\n<p>When ex_aws builds a path-style S3 request, <code>ExAws.Operation.S3.add_bucket_to_path/2</code> in <code>lib/ex_aws/operation/s3.ex</code> joins the bucket name and the object key into a single path string and then normalizes it, collapsing <code>.</code> and <code>..</code> segments the way a filesystem path would. Because the bucket is the first segment of the combined string, a leading <code>../</code> in the object key pops the bucket off the path. With bucket <code>mybucket</code> and a key of <code>../victim/secret.txt</code>, the combined <code>/mybucket/../victim/secret.txt</code> normalizes to <code>/victim/secret.txt</code>, so the request (signed with the application's own credentials) is sent to bucket <code>victim</code>. The same mechanism collapses <code>../</code> within a key, defeating any isolation an application enforces by prepending a trusted prefix.</p>\n<p>Only the default path-style configuration is affected; requests built with <code>virtual_host: true</code> do not run this normalization. Because S3 treats object keys as opaque and does not resolve <code>..</code> itself, the client-side normalization introduces a traversal that would not otherwise exist. Any application that derives an S3 object key from untrusted input and relies on the bucket, or a key prefix, as a tenant or trust boundary is exposed to cross-bucket or cross-prefix read and write, depending on the operation and the credentials' permissions.</p>\n<p>This issue affects ex_aws: from 2.1.7 before 2.8.0.</p>"},{"base64":false,"type":"text/markdown","value":"Relative path traversal in ex_aws allows an attacker who controls an S3 object key to escape the intended bucket or key prefix.\n\nWhen ex_aws builds a path-style S3 request, `ExAws.Operation.S3.add_bucket_to_path/2` in `lib/ex_aws/operation/s3.ex` joins the bucket name and the object key into a single path string and then normalizes it, collapsing `.` and `..` segments the way a filesystem path would. Because the bucket is the first segment of the combined string, a leading `../` in the object key pops the bucket off the path. With bucket `mybucket` and a key of `../victim/secret.txt`, the combined `/mybucket/../victim/secret.txt` normalizes to `/victim/secret.txt`, so the request (signed with the application's own credentials) is sent to bucket `victim`. The same mechanism collapses `../` within a key, defeating any isolation an application enforces by prepending a trusted prefix.\n\nOnly the default path-style configuration is affected; requests built with `virtual_host: true` do not run this normalization. Because S3 treats object keys as opaque and does not resolve `..` itself, the client-side normalization introduces a traversal that would not otherwise exist. Any application that derives an S3 object key from untrusted input and relies on the bucket, or a key prefix, as a tenant or trust boundary is exposed to cross-bucket or cross-prefix read and write, depending on the operation and the credentials' permissions.\n\nThis issue affects ex_aws: from 2.1.7 before 2.8.0."}],"value":"Relative path traversal in ex_aws allows an attacker who controls an S3 object key to escape the intended bucket or key prefix.\n\nWhen ex_aws builds a path-style S3 request, ExAws.Operation.S3.add_bucket_to_path/2 in lib/ex_aws/operation/s3.ex joins the bucket name and the object key into a single path string and then normalizes it, collapsing . and .. segments the way a filesystem path would. Because the bucket is the first segment of the combined string, a leading ../ in the object key pops the bucket off the path. With bucket mybucket and a key of ../victim/secret.txt, the combined /mybucket/../victim/secret.txt normalizes to /victim/secret.txt, so the request (signed with the application's own credentials) is sent to bucket victim. The same mechanism collapses ../ within a key, defeating any isolation an application enforces by prepending a trusted prefix.\n\nOnly the default path-style configuration is affected; requests built with virtual_host: true do not run this normalization. Because S3 treats object keys as opaque and does not resolve .. itself, the client-side normalization introduces a traversal that would not otherwise exist. Any application that derives an S3 object key from untrusted input and relies on the bucket, or a key prefix, as a tenant or trust boundary is exposed to cross-bucket or cross-prefix read and write, depending on the operation and the credentials' permissions.\n\nThis issue affects ex_aws: from 2.1.7 before 2.8.0."}],"impacts":[{"capecId":"CAPEC-139","descriptions":[{"lang":"en","value":"CAPEC-139 Relative Path Traversal"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":7.4,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-23","description":"CWE-23 Relative Path Traversal","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-24T11:45:30.199Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"tags":["vendor-advisory","related"],"url":"https://github.com/ex-aws/ex_aws/security/advisories/GHSA-hrw3-2h5r-fhxx"},{"name":"EEF CNA record for CVE-2026-59698","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-59698.html"},{"name":"OSV record EEF-CVE-2026-59698","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-59698"},{"name":"Introducing commit 557d343 in ex-aws/ex_aws","tags":["related"],"url":"https://github.com/ex-aws/ex_aws/commit/557d3438a7e739a25c1ccc1876a5b636793f20ba"},{"name":"Fix commit b1116f9 in ex-aws/ex_aws","tags":["patch"],"url":"https://github.com/ex-aws/ex_aws/commit/b1116f9f92a8ec1f7f2f3f692bd1c5cacaddf6fd"}],"source":{"discovery":"EXTERNAL"},"title":"ex_aws normalizes .. in S3 object keys client-side, allowing bucket or key-prefix escape","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Configure the ex_aws S3 client with <code>virtual_host: true</code>, which builds the request without the client-side path normalization. Alternatively, reject or sanitize object keys that contain <code>..</code> segments before passing them to ex_aws.</p>"},{"base64":false,"type":"text/markdown","value":"Configure the ex_aws S3 client with `virtual_host: true`, which builds the request without the client-side path normalization. Alternatively, reject or sanitize object keys that contain `..` segments before passing them to ex_aws."}],"value":"Configure the ex_aws S3 client with virtual_host: true, which builds the request without the client-side path normalization. Alternatively, reject or sanitize object keys that contain .. segments before passing them to ex_aws."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>An application isolates data in its own bucket <code>mybucket</code> and builds the object key from user input, using the default path-style S3 configuration.</li>\n<li>It issues the request through the public API: <code>ExAws.S3.get_object(\"mybucket\", key) |&gt; ExAws.request(config)</code>.</li>\n<li>The attacker supplies the key <code>../victim/secret.txt</code>.</li>\n<li>ex_aws joins and normalizes the path, so <code>/mybucket/../victim/secret.txt</code> becomes <code>/victim/secret.txt</code>.</li>\n<li>The request is signed with the application's credentials and sent to <code>/victim/secret.txt</code>, addressing bucket <code>victim</code> instead of <code>mybucket</code>.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. An application isolates data in its own bucket `mybucket` and builds the object key from user input, using the default path-style S3 configuration.\n2. It issues the request through the public API: `ExAws.S3.get_object(\"mybucket\", key) |> ExAws.request(config)`.\n3. The attacker supplies the key `../victim/secret.txt`.\n4. ex_aws joins and normalizes the path, so `/mybucket/../victim/secret.txt` becomes `/victim/secret.txt`.\n5. The request is signed with the application's credentials and sent to `/victim/secret.txt`, addressing bucket `victim` instead of `mybucket`."}],"value":"* An application isolates data in its own bucket mybucket and builds the object key from user input, using the default path-style S3 configuration.\n* It issues the request through the public API: ExAws.S3.get_object(\"mybucket\", key) |> ExAws.request(config).\n* The attacker supplies the key ../victim/secret.txt.\n* ex_aws joins and normalizes the path, so /mybucket/../victim/secret.txt becomes /victim/secret.txt.\n* The request is signed with the application's credentials and sent to /victim/secret.txt, addressing bucket victim instead of mybucket."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. Path assembly.</strong> In the default path-style clause of <code>ExAws.Operation.S3.add_bucket_to_path/2</code> (taken whenever <code>virtual_host: true</code> is not set), the bucket and the operation path are concatenated and then normalized: <code>\"/#{operation.bucket}#{ensure_absolute(operation.path)}\" |&gt; expand_dot()</code>.</p>\n<p><strong>2. Normalization across the bucket boundary.</strong> <code>expand_dot/1</code> and <code>do_expand_dot/2</code> resolve <code>.</code> and <code>..</code> segments the way a filesystem path would. The bucket is just the first segment of the combined string, so a <code>..</code> in the object key pops it: <code>/mybucket/../victim/secret.txt</code> becomes <code>/victim/secret.txt</code>. The only guard, the root clamp <code>do_expand_dot([\"..\" | t], [])</code>, stops <code>..</code> from climbing above <code>/</code> but does not protect the bucket segment. The same collapse lets <code>../</code> escape a trusted key prefix within a bucket.</p>\n<p><strong>3. Signed request.</strong> The normalized path is signed with the application's credentials and sent, so the request is authorized against the bucket or prefix the attacker chose. S3 treats object keys as opaque and does not resolve <code>..</code> itself; the traversal exists only because the client normalizes the path. The <code>virtual_host</code> clauses do not normalize, so behavior differs between configurations.</p>"},{"base64":false,"type":"text/markdown","value":"**1. Path assembly.** In the default path-style clause of `ExAws.Operation.S3.add_bucket_to_path/2` (taken whenever `virtual_host: true` is not set), the bucket and the operation path are concatenated and then normalized: `\"/#{operation.bucket}#{ensure_absolute(operation.path)}\" |> expand_dot()`.\n\n**2. Normalization across the bucket boundary.** `expand_dot/1` and `do_expand_dot/2` resolve `.` and `..` segments the way a filesystem path would. The bucket is just the first segment of the combined string, so a `..` in the object key pops it: `/mybucket/../victim/secret.txt` becomes `/victim/secret.txt`. The only guard, the root clamp `do_expand_dot([\"..\" | t], [])`, stops `..` from climbing above `/` but does not protect the bucket segment. The same collapse lets `../` escape a trusted key prefix within a bucket.\n\n**3. Signed request.** The normalized path is signed with the application's credentials and sent, so the request is authorized against the bucket or prefix the attacker chose. S3 treats object keys as opaque and does not resolve `..` itself; the traversal exists only because the client normalizes the path. The `virtual_host` clauses do not normalize, so behavior differs between configurations."}],"value":"1. Path assembly. In the default path-style clause of ExAws.Operation.S3.add_bucket_to_path/2 (taken whenever virtual_host: true is not set), the bucket and the operation path are concatenated and then normalized: \"/#{operation.bucket}#{ensure_absolute(operation.path)}\" |> expand_dot().\n\n2. Normalization across the bucket boundary. expand_dot/1 and do_expand_dot/2 resolve . and .. segments the way a filesystem path would. The bucket is just the first segment of the combined string, so a .. in the object key pops it: /mybucket/../victim/secret.txt becomes /victim/secret.txt. The only guard, the root clamp do_expand_dot([\"..\" | t], []), stops .. from climbing above / but does not protect the bucket segment. The same collapse lets ../ escape a trusted key prefix within a bucket.\n\n3. Signed request. The normalized path is signed with the application's credentials and sent, so the request is authorized against the bucket or prefix the attacker chose. S3 treats object keys as opaque and does not resolve .. itself; the traversal exists only because the client normalizes the path. The virtual_host clauses do not normalize, so behavior differs between configurations."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-59698","datePublished":"2026-11-24T11:45:30.199Z","dateReserved":"2026-07-06T14:05:47.003Z","dateUpdated":"2026-11-24T11:45:30.199Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}