Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
One forgeable header gives unauthenticated remote impersonation, so AV:N/AC:L/PR:N/UI:N with high confidentiality and integrity impact and no availability effect.
Primary rating from Vendor (openjs).
CVSS VectorVendor: openjs
Lifecycle Timeline
3DescriptionCVE.org
@fastify/aws-lambda version 6.4.0 decorates each Fastify request with request.awsLambda.event and request.awsLambda.context, values that applications are documented to use for authorization decisions such as reading API Gateway authorizer claims. In the default configuration, the getter that populates this decoration reads the client-controlled x-apigateway-event and x-apigateway-context HTTP headers before falling back to the trusted internal request token, and those reserved headers are not stripped from the incoming event. An unauthenticated attacker who can set a single HTTP header can therefore forge the entire Lambda proxy event, including the authorizer context, and override the genuine one. This results in a full authentication and authorization bypass and privilege escalation for any application that trusts request.awsLambda.event for identity or access control. Only version 6.4.0 is affected. Patches: upgrade to @fastify/aws-lambda 6.4.1, which resolves the decoration only through the internal per-invocation token and strips the reserved headers before the request is processed.
AnalysisAI
Authentication and authorization bypass in @fastify/aws-lambda 6.4.0 lets an unauthenticated remote attacker forge the entire AWS Lambda proxy event by setting a single client-controlled HTTP header. Because the request.awsLambda.event/context decoration reads the untrusted x-apigateway-event and x-apigateway-context headers before falling back to the trusted internal invocation token, any application that consults these values for identity or API Gateway authorizer claims can be tricked into granting attacker-chosen access, enabling full privilege escalation. Rated CVSS 9.1; no public exploit identified at time of analysis, but the attack is trivial and documented in the vendor advisory.
Technical ContextAI
@fastify/aws-lambda (aws-lambda-fastify) is an adapter that lets a Fastify HTTP application run inside an AWS Lambda function behind API Gateway/ALB by translating the Lambda proxy integration event into a synthetic Fastify request. It decorates each request with request.awsLambda.event and request.awsLambda.context so handlers can read Lambda-specific context - notably event.requestContext.authorizer, which carries claims produced by an API Gateway authorizer and is commonly trusted for authorization. The root cause maps to CWE-345 (Insufficient Verification of Data Authenticity): the getter populating this decoration prefers the inbound x-apigateway-event and x-apigateway-context HTTP headers over the adapter's internal per-invocation token, and these reserved headers are not stripped from the incoming event, so client-supplied data is treated as trusted platform-supplied data. The single affected package is identified by cpe:2.3:a:@fastify/aws-lambda:@fastify/aws-lambda:*:*:*:*:*:*:*:* and only release 6.4.0 exhibits the flaw.
RemediationAI
Vendor-released patch: upgrade @fastify/aws-lambda from 6.4.0 to 6.4.1, which resolves the decoration exclusively through the internal per-invocation token and strips the reserved x-apigateway-event and x-apigateway-context headers before the request is processed; this is the primary and complete fix. As an interim compensating control if you cannot upgrade immediately, strip or reject the x-apigateway-event and x-apigateway-context request headers at the edge (API Gateway mapping, ALB rules, WAF, or a Fastify onRequest hook) so client-supplied values never reach the getter - the trade-off is that any legitimate use of those exact reserved header names would also be blocked, which is acceptable. Additionally, avoid trusting request.awsLambda.event for authorization until patched, preferring a verified identity source. See https://github.com/fastify/aws-lambda-fastify/security/advisories/GHSA-m93c-jj3f-68ph and https://cna.openjsf.org/security-advisories.html.
Same technique Privilege Escalation
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-52329