Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Requires an authenticated Studio schema author (PR:L) and a victim build/render step (UI:R); injected code crosses into other execution environments (S:C) with full code-execution impact.
Primary rating from Vendor (AMZN).
CVSS VectorVendor: AMZN
Lifecycle Timeline
5DescriptionCVE.org
Improper control of code generation in Amazon @aws-amplify/codegen-ui-react before 2.20.6 might allow a remote authenticated user to execute arbitrary code in end-user browsers, developer machines, CI/CD environments, and server-side rendering contexts via crafted Studio component or theme schema values due to insufficient coverage and effectiveness of the input validation introduced for CVE-2025-4318.
To remediate this issue, users should upgrade to version 2.20.6
AnalysisAI
Code injection in Amazon's @aws-amplify/codegen-ui-react before 2.20.6 lets a remote authenticated Amplify Studio user embed attacker-controlled code into generated React components by supplying crafted component or theme schema values (CWE-94). The malicious code executes wherever the generated artifacts run - end-user browsers, developer machines, CI/CD pipelines, and server-side rendering contexts - giving broad code-execution reach. This is a bypass of the input validation added for CVE-2025-4318, which proved insufficient in coverage and effectiveness; no public exploit has been identified at time of analysis, though a vendor patch (v2.20.6) is available.
Technical ContextAI
The affected component is @aws-amplify/codegen-ui-react, the React code generator that turns Amplify Studio visual designs (component definitions and theme schemas) into TypeScript/JSX source code. The root cause class is CWE-94 (Improper Control of Generation of Code), meaning untrusted schema field values are placed into emitted source without adequate sanitization or escaping, so a value can break out of its intended literal context and become executable code in the generated file. The v2.20.6 fix specifically emits non-identifier theme keys as string literals (commit 062c3a5, PR #1202), indicating that theme keys/values previously written as raw identifiers or object keys could be crafted to inject code. Because the generator output is consumed downstream - bundled into browser apps, run during builds, and executed under SSR - the injected code inherits the privileges of each of those execution environments. CPE cpe:2.3:a:aws:amplify_codegen_ui:*:*:*:*:*:*:*:* covers the affected package.
RemediationAI
Upgrade to @aws-amplify/codegen-ui-react version 2.20.6, the vendor-released patch that emits non-identifier theme keys as string literals to prevent injection (release: https://github.com/aws-amplify/amplify-codegen-ui/releases/tag/v2.20.6; advisory: https://aws.amazon.com/security/security-bulletins/2026-066-aws/ and https://github.com/aws-amplify/amplify-codegen-ui/security/advisories/GHSA-74xx-rjgf-m69j). Because the prior CVE-2025-4318 fix was incomplete, do not rely on any pre-2.20.6 build. Until the upgrade is deployed, restrict who can author or import Studio component and theme schemas to trusted developers, review generated code diffs before building or deploying (treat unexpected identifiers or executable-looking theme keys as suspect), and avoid running codegen or builds on untrusted schema input in privileged CI/CD or SSR contexts; the trade-off is added review friction and slower design-to-code turnaround, but it directly limits the code-execution path pending patching.
Unauthorized data access in Budibase low-code platform before 3.30.4 allows unauthenticated users to manipulate internal
Multiple vulnerabilities in ASTPP 4.0.1 including XSS and command injection in SIP device configuration and plugin manag
Remote code execution in Amazon awslabs postgres-mcp-server before 1.1.7 lets remote actors run arbitrary OS commands on
Remote code execution in AWS AgentCore CLI before v0.14.2 allows authenticated attackers to inject Python code via craft
Denial of service in Amazon's aws-smithy-http-server Rust crate (versions prior to 0.66.5) lets remote unauthenticated a
Argument injection in the AWS Bedrock AgentCore Python SDK before 1.18.1 lets a remote authenticated user run arbitrary
Arbitrary file read in amazon-mq rabbitmq-aws before 0.2.1 allows authenticated remote users to read any file accessible
WAF managed-rule body inspection on AWS Application Load Balancer (ALB) can be bypassed by remote actors who fragment an
WAF inspection bypass in Amazon CloudFront (with AWS WAF enabled) lets remote actors smuggle malicious request bodies pa
A trust boundary enforcement vulnerability in Kiro IDE allows remote attackers to execute arbitrary code when a local us
Bullwark Momentum Series JAWS 1.0 contains a directory traversal vulnerability that allows unauthenticated attackers to
Command injection in Amazon ECS Agent on Windows allows authenticated attackers with task definition permissions to exec
Same weakness CWE-94 – Code Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51268