EEF-CVE-2026-65622: ex_aws_ses missing URI-encoding of list_name allows path injection into SES V2 request URLs
Summary
Improper Encoding or Escaping of Output vulnerability in ex-aws exawsses (ExAws.SES module) allows path injection into Amazon SES V2 request URLs.
This vulnerability is associated with program file lib/exaws/ses.ex and program routines ExAws.SES.deletecontactlist/1, ExAws.SES.getcontactlist/1, ExAws.SES.updatecontactlist/2, ExAws.SES.createcontact/3, ExAws.SES.getcontact/2, ExAws.SES.updatecontact/3, ExAws.SES.deletecontact/2 and ExAws.SES.listcontacts/1.
The V2 contact-list and contact functions interpolate the caller-supplied listname into the request path without URI-encoding it, unlike the email address in the same functions which is passed through ExAws.Request.Url.uriencode/1. An application that forwards untrusted input as a contact-list name lets an attacker embed /, .. or ? to escape the intended contact-lists/<name> path segment. A value such as x/../suppression/addresses/victim%40example.com makes a deletecontactlist/1 call arrive at the account-wide suppression list. The request is still signed with the application's own AWS credentials and sent to the configured SES host, so the impact is cross-resource request forgery inside the caller's own AWS account, not arbitrary SSRF. Applications that only use hardcoded or strictly validated list names are not affected.
This issue affects exawsses: from 2.3.0 before 2.5.0.
Details
1. Raw interpolation. Every V2 contact-list and contact function in lib/exaws/ses.ex builds its resource string by interpolating listname as given, for example requestv2(:delete, "contact-lists/#{listname}") in deletecontactlist/1. requestv2/2 then appends it to the operation path as @v2path <> "/#{resource}".
2. Inconsistent encoding. The same functions pass the email address through ExAws.Request.Url.uriencode/1, but listname is neither encoded nor validated. uriencode/1 itself leaves / unencoded, so an email address containing / can add path segments as well.
3. Segment escape. A list name such as x/../suppression/addresses/victim%40example.com produces /v2/email/contact-lists/x/../suppression/addresses/victim%40example.com, which normalizes to the account's suppression list. Appending /contacts/<addr> turns a list-level operation into a contact operation, and a ? can inject query parameters. The request is signed with the application's credentials and sent to the configured SES host, so the effect is cross-resource request forgery inside the caller's own AWS account.
Proof of concept
1. An application takes a contact-list name from untrusted input and calls ExAws.SES.deletecontactlist(listname) |> ExAws.request(). 2. The attacker supplies x/../suppression/addresses/victim@example.com (with the @ percent-encoded) as the list name. 3. deletecontactlist/1 interpolates it unencoded, so the signed request is DELETE /v2/email/contact-lists/x/../suppression/addresses/victim%40example.com. 4. Once the .. is normalized, the request deletes the victim address from the account-wide suppression list instead of deleting a contact list.
Impact
An attacker who controls a contact-list name, or an email address passed to the V2 contact functions, can redirect an authenticated, SigV4-signed SES request to a different resource in the account, causing unintended reads, modifications or deletions (for example manipulating the account-wide suppression list) while the application believes it is operating only on the named contact list or contact. Applications that only use hardcoded or strictly validated values for these arguments are not affected.
Workarounds
Restrict listname to Amazon SES's permitted contact-list character set, or run it through ExAws.Request.Url.uriencode/1, before passing it to the affected functions.
Configurations
The application must pass externally-influenced input (such as an HTTP parameter, a queue message, or a tenant record) as the listname argument to one of the affected ExAws.SES V2 contact-list or contact functions. Applications that only use hardcoded or strictly validated list names are not affected.
Other sources
Improper Encoding or Escaping of Output vulnerability in ex-aws exawsses (ExAws.SES module) allows path injection into Amazon SES V2 request URLs.
This vulnerability is associated with program file lib/exaws/ses.ex and program routines ExAws.SES.deletecontactlist/1, ExAws.SES.getcontactlist/1, ExAws.SES.updatecontactlist/2, ExAws.SES.createcontact/3, ExAws.SES.getcontact/2, ExAws.SES.updatecontact/3, ExAws.SES.deletecontact/2 and ExAws.SES.listcontacts/1.
The V2 contact-list and contact functions interpolate the caller-supplied listname into the request path without URI-encoding it, unlike the email address in the same functions which is passed through ExAws.Request.Url.uriencode/1. An application that forwards untrusted input as a contact-list name lets an attacker embed /, .. or ? to escape the intended contact-lists/<name> path segment. A value such as x/../suppression/addresses/victim%40example.com makes a deletecontactlist/1 call arrive at the account-wide suppression list. The request is still signed with the application's own AWS credentials and sent to the configured SES host, so the impact is cross-resource request forgery inside the caller's own AWS account, not arbitrary SSRF. Applications that only use hardcoded or strictly validated list names are not affected.
This issue affects exawsses: from 2.3.0 before 2.5.0.
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
erlang/ex_aws_sesto a version that resolves this vulnerability.Fixed in 2.5.0 - Compensating control
Restrict externally influenced list_name values to Amazon SES's permitted contact-list character set before passing them to the affected ExAws.SES V2 contact-list or contact functions.
Event History
Frequently Asked Questions
When is an application exposed to this issue?
Exposure exists when the application forwards untrusted input as a SES contact-list name to the affected ExAws.SES contact-list or contact functions. An attacker can use path characters such as /, .., or ? in that value to alter the intended request path.
Which application operations should be reviewed?
Review uses of ExAws.SES.delete_contact_list/1, get_contact_list/1, update_contact_list/2, create_contact/3, get_contact/2, update_contact/3, delete_contact/2, and list_contacts/1. These routines interpolate list_name into the SES V2 request path without URI encoding.
What can an attacker reach through a successful exploit?
The request remains signed with the application's AWS credentials and is sent to its configured SES host, so the attacker can cause requests against other SES resources available within that AWS account. The described example redirects a delete_contact_list/1 request to an account-wide suppression-list address path.