AWS Security ChangesHomeSearch

AWS appsync: AppSync VTL resolver sourceIp list and X-Forwarded-For warning

Service: appsync · 2026-10-07 · Documentation medium

File: appsync/latest/devguide/resolver-context-reference.md · Type: authz

Summary

Rewrites the `$context.request.sourceIp` reference to describe it as an ordered list of addresses (X-Forwarded-For entries in order, then the connection address) and adds an Important callout that the header is client-controlled and unverified, so only the last element should be used for authorization and other entries sanitized.

Security assessment

Same advisory content as the JavaScript resolver reference: it documents that `sourceIp` contains unvalidated, spoofable `x-forwarded-for` values and tells users to trust only the final connection-derived address for authorization, preventing IP-based authz bypass. No specific vulnerability, advisory, or incident is cited, so it is categorized as security documentation/hardening.

Evidence

+Clients and intermediate proxies can set the `x-forwarded-for` header to any value, and AWS AppSync doesn't verify it. Use only the last element of `sourceIp` for authorization decisions, and sanitize the other entries before you use them.

Diff

diff --git a/appsync/latest/devguide/resolver-context-reference.md b/appsync/latest/devguide/resolver-context-reference.md
index 98c08dc..c71fdd3 100644
--- a//appsync/latest/devguide/resolver-context-reference.md
+++ b//appsync/latest/devguide/resolver-context-reference.md
@@ -215 +215 @@ The token issuer.
-The source IP address of the caller that AWS AppSync receives. If the request doesn't include the `x-forwarded-for` header, the source IP value contains only a single IP address from the TCP connection. If the request includes a `x-forwarded-for` header, the source IP is a list of IP addresses from the `x-forwarded-for` header, in addition to the IP address from the TCP connection.
+A list of the source IP addresses for the request that AWS AppSync receives. If the request doesn't include an `x-forwarded-for` header, the list contains only the address of the connection to AWS AppSync. If the request includes an `x-forwarded-for` header, the list contains the addresses from that header in order, followed by the address of the connection to AWS AppSync. For example, if the header is ``ip-1`, `ip-2`` and the connection comes from ``ip-3``, `sourceIp` is `[`ip-1`, `ip-2`, `ip-3`]`.
@@ -236,0 +237,4 @@ The user name of the authenticated user. In the case of `AMAZON_COGNITO_USER_POO
+###### Important
+
+Clients and intermediate proxies can set the `x-forwarded-for` header to any value, and AWS AppSync doesn't verify it. Use only the last element of `sourceIp` for authorization decisions, and sanitize the other entries before you use them.
+