CVE-2026-63584: Copy-source header injection in ExAws.S3.upload_part_copy/8 via unencoded source key
Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in ex-aws exawss3 allows HTTP header injection via an attacker-controlled copy-source key.
ExAws.S3.uploadpartcopy/8 in lib/exaws/s3.ex builds the x-amz-copy-source request header by interpolating the source bucket and object key directly into "/#{srcbucket}/#{srcobject}" with no percent-encoding. The sibling function putobjectcopy percent-encodes the bucket and each path segment before assembling the same header, but uploadpartcopy skips encoding entirely.
When the source key is derived from untrusted input, reserved characters (spaces, ?, &, =) pass through verbatim and corrupt the copy-source reference, so the copy targets the wrong object or fails. A key containing \r or \n can split or inject additional headers into the outgoing HTTP request, depending on how the configured HTTP backend serializes headers.
Applications that pass a source bucket or object key derived from untrusted input to ExAws.S3.uploadpartcopy/8 are affected. Applications that only ever pass trusted, well-formed keys are not affected.
This issue affects exawss3: from 2.0.0 before 2.6.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.6.0
Event History
Frequently Asked Questions
Which versions require remediation?
ex_aws_s3 versions from 2.0.0 before 2.6.0 are affected. Upgrade to 2.6.0 or later.
What conditions are needed for exploitation?
An attacker must be able to influence the source bucket or object key supplied to ExAws.S3.upload_part_copy/8. The CRLF header-injection impact also depends on how the configured HTTP backend serializes request headers.
Are applications using this library by default affected?
No. Applications are affected when they pass source bucket or object-key values derived from untrusted input to upload_part_copy/8. Applications that only pass trusted, well-formed keys are not affected.
What can be done before upgrading?
Do not pass untrusted source bucket or object-key values to ExAws.S3.upload_part_copy/8. Restrict this call to trusted, well-formed values until the dependency can be updated.
How can teams identify potentially affected code?
Review uses of ExAws.S3.upload_part_copy/8 and trace the source bucket and source object key back to their origin. Calls receiving user-controlled or otherwise untrusted values are potentially affected.