{"id":"EEF-CVE-2026-62272","summary":"ex_aws_lambda relative path traversal via unencoded identifiers in ExAws.Lambda request paths","details":"## Summary\n\nRelative Path Traversal vulnerability in ex-aws ex_aws_lambda (`ExAws.Lambda` module) allows an attacker to redirect an AWS Lambda control-plane request at an unintended resource by injecting path traversal sequences into a caller-supplied identifier.\n\nThis vulnerability is associated with program file `lib/ex_aws/lambda.ex` and program routines `ExAws.Lambda.add_permission/5`, `ExAws.Lambda.delete_event_source_mapping/1`, `ExAws.Lambda.delete_function/1`, `ExAws.Lambda.get_event_source_mapping/1`, `ExAws.Lambda.get_function/1`, `ExAws.Lambda.get_function_configuration/1`, `ExAws.Lambda.get_policy/1`, `ExAws.Lambda.invoke/4`, `ExAws.Lambda.invoke_async/2`, `ExAws.Lambda.remove_permission/2`, `ExAws.Lambda.update_event_source_mapping/2`, `ExAws.Lambda.update_function_code/2`, `ExAws.Lambda.update_function_configuration/2`.\n\n`ExAws.Lambda` builds every request path by interpolating caller-supplied identifiers (function names, ARNs, UUIDs, statement IDs) directly into the URL with plain string interpolation, without percent-encoding or validation. The shared request helper only encodes query parameters, never the path, so path metacharacters such as `/` and `..` reach the wire unchanged. An application that passes an untrusted or user-influenced identifier into an `ExAws.Lambda` operation can therefore have its request steered at a different Lambda resource: a `../` segment climbs out of the intended `/2015-03-31/functions/\u003cname\u003e` slot and, once the `..` is normalized by the HTTP client or the AWS endpoint, addresses a sibling function in the same account. The signed credentials and the HTTP method are unchanged, so the request still succeeds against the wrong resource. Affected operations include function deletion, invocation, configuration updates, and permission changes. Applications that only pass hardcoded or strictly validated identifiers are not affected.\n\nThis issue affects ex_aws_lambda: from 2.0.1 before 2.2.0.\n\n## Details\n\n**1. Path construction.** Every operation in `lib/ex_aws/lambda.ex` builds its request path by interpolating a caller-supplied identifier (`function_name`, `function_arn`, `uuid`, `source_mapping_uuid` or `statement_id`) into a string, for example `\"/2015-03-31/functions/#{function_name}\"` in `delete_function/1`.\n\n**2. No encoding.** The shared `request/6` helper encodes only the query parameters and passes the path through to the operation verbatim, and no identifier is checked against Lambda's name and ARN character set. Path metacharacters such as `/`, `..`, `?` and `#` reach the wire unchanged.\n\n**3. Redirected request.** A `..` segment climbs out of the intended `/2015-03-31/functions/\u003cname\u003e` slot. Once the HTTP client or the AWS endpoint normalizes it, the request addresses a sibling resource. The HTTP method and the signed credentials are unchanged, so the delete, invoke, configuration update or permission change succeeds against the wrong function in the same account.\n\n## Proof of concept\n\n1. An application lets a user delete their own Lambda function by name and passes the name to `ExAws.Lambda.delete_function/1 |\u003e ExAws.request()`.\n2. The application intends to delete `tenant-a-fn`; the attacker supplies the name `tenant-a-fn/../victim-fn`.\n3. `delete_function/1` interpolates it into `/2015-03-31/functions/tenant-a-fn/../victim-fn`, and `request/6` leaves the path untouched.\n4. The signed `DELETE` request goes out with the literal `/../` in its path.\n5. Once the `..` is normalized, the request addresses `/2015-03-31/functions/victim-fn` and deletes a function other than the intended one.\n\n## Impact\n\nThis is an input-validation / path-injection issue in request construction. It affects any application using `ex_aws_lambda` that passes user- or tenant-supplied identifiers (`function_name`, `function_arn`, `uuid`, `source_mapping_uuid`, `statement_id`) into `ExAws.Lambda` operations without sanitizing them first, typically apps that expose Lambda management behind an HTTP boundary. The consequence is cross-resource action: a control-plane call (delete, invoke, update configuration, add/remove permission) executed against a Lambda function other than the intended one, within the same account and credentials. Applications that only ever pass hardcoded or strictly validated names are unaffected.\n\n## Workarounds\n\nValidate each caller-supplied identifier against AWS Lambda's permitted name and ARN character set before passing it to an `ExAws.Lambda` operation, or percent-encode each identifier segment (for example `URI.encode(segment, &URI.char_unreserved?/1)`) so that path metacharacters cannot alter the request path.\n\n## Configurations\n\nThe affected application must pass an untrusted or user-influenced identifier (function name, ARN, UUID, source mapping UUID, or statement ID) into an `ExAws.Lambda` operation without first validating it against the AWS Lambda name and ARN character set. Exploitation additionally depends on the configured HTTP client or the AWS endpoint normalizing `..` path segments before routing. Applications that only ever pass hardcoded or strictly validated identifiers are not affected.","aliases":["GHSA-rxg9-76jv-f68p","CVE-2026-62272"],"modified":"2026-11-26T13:15:03.266152088Z","published":"2026-11-26T13:10:11.240Z","database_specific":{"$schema":"https://cna.erlef.org/schemas/osv/record-0.1.0.json","capec_ids":["CAPEC-139"],"cpe_ids":["cpe:2.3:a:ex-aws:ex_aws_lambda:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-23"]},"references":[{"type":"ADVISORY","url":"https://github.com/ex-aws/ex_aws_lambda/security/advisories/GHSA-rxg9-76jv-f68p"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-62272.html"},{"type":"WEB","url":"https://github.com/ex-aws/ex_aws_lambda/commit/c961161df71bc778a26bbb14718b5b7153296575"},{"type":"FIX","url":"https://github.com/ex-aws/ex_aws_lambda/commit/72a565cd6bd583f59cbb303c819b8b30e98c2e5c"},{"type":"PACKAGE","url":"https://hex.pm/packages/ex_aws_lambda"}],"affected":[{"package":{"name":"ex_aws_lambda","ecosystem":"Hex","purl":"pkg:hex/ex_aws_lambda"},"ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.1"},{"fixed":"2.2.0"}]}],"versions":["2.0.1","2.0.2","2.1.0"],"ecosystem_specific":{"modules":["'Elixir.ExAws.Lambda'"],"program_files":["lib/ex_aws/lambda.ex"],"program_routines":["'Elixir.ExAws.Lambda':add_permission/5","'Elixir.ExAws.Lambda':delete_event_source_mapping/1","'Elixir.ExAws.Lambda':delete_function/1","'Elixir.ExAws.Lambda':get_event_source_mapping/1","'Elixir.ExAws.Lambda':get_function/1","'Elixir.ExAws.Lambda':get_function_configuration/1","'Elixir.ExAws.Lambda':get_policy/1","'Elixir.ExAws.Lambda':invoke/4","'Elixir.ExAws.Lambda':invoke_async/2","'Elixir.ExAws.Lambda':remove_permission/2","'Elixir.ExAws.Lambda':update_event_source_mapping/2","'Elixir.ExAws.Lambda':update_function_code/2","'Elixir.ExAws.Lambda':update_function_configuration/2"],"$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"},"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-62272.json","$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json","modules":["'Elixir.ExAws.Lambda'"],"program_files":["lib/ex_aws/lambda.ex"],"program_routines":["'Elixir.ExAws.Lambda':add_permission/5","'Elixir.ExAws.Lambda':delete_event_source_mapping/1","'Elixir.ExAws.Lambda':delete_function/1","'Elixir.ExAws.Lambda':get_event_source_mapping/1","'Elixir.ExAws.Lambda':get_function/1","'Elixir.ExAws.Lambda':get_function_configuration/1","'Elixir.ExAws.Lambda':get_policy/1","'Elixir.ExAws.Lambda':invoke/4","'Elixir.ExAws.Lambda':invoke_async/2","'Elixir.ExAws.Lambda':remove_permission/2","'Elixir.ExAws.Lambda':update_event_source_mapping/2","'Elixir.ExAws.Lambda':update_function_code/2","'Elixir.ExAws.Lambda':update_function_configuration/2"]}},{"ranges":[{"type":"GIT","repo":"https://github.com/ex-aws/ex_aws_lambda","events":[{"introduced":"c961161df71bc778a26bbb14718b5b7153296575"},{"fixed":"72a565cd6bd583f59cbb303c819b8b30e98c2e5c"}]}],"versions":["v2.1.0","v2.0.2","v2.0.1"],"database_specific":{"program_routines":["'Elixir.ExAws.Lambda':add_permission/5","'Elixir.ExAws.Lambda':delete_event_source_mapping/1","'Elixir.ExAws.Lambda':delete_function/1","'Elixir.ExAws.Lambda':get_event_source_mapping/1","'Elixir.ExAws.Lambda':get_function/1","'Elixir.ExAws.Lambda':get_function_configuration/1","'Elixir.ExAws.Lambda':get_policy/1","'Elixir.ExAws.Lambda':invoke/4","'Elixir.ExAws.Lambda':invoke_async/2","'Elixir.ExAws.Lambda':remove_permission/2","'Elixir.ExAws.Lambda':update_event_source_mapping/2","'Elixir.ExAws.Lambda':update_function_code/2","'Elixir.ExAws.Lambda':update_function_configuration/2"],"source":"https://cna.erlef.org/osv/EEF-CVE-2026-62272.json","$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json","modules":["'Elixir.ExAws.Lambda'"],"program_files":["lib/ex_aws/lambda.ex"]}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:L/SA:L","source":"CNA"}],"credits":[{"name":"Peter Ullrich","type":"FINDER"},{"name":"Peter Ullrich","type":"REPORTER"},{"name":"Jonatan Männchen / EEF","type":"ANALYST"},{"name":"Peter Ullrich","type":"COORDINATOR"},{"name":"Bernard Duggan","type":"REMEDIATION_DEVELOPER"}]}