Arbitrary Code Injection Affecting @aws-amplify/codegen-ui-react package, versions <2.20.6


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.53% (43rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-AWSAMPLIFYCODEGENUIREACT-18601829
  • published10 Aug 2026
  • disclosed30 Jul 2026
  • creditUnknown

Introduced: 30 Jul 2026

NewCVE-2026-18245  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade @aws-amplify/codegen-ui-react to version 2.20.6 or higher.

Overview

@aws-amplify/codegen-ui-react is an Amplify UI React code generation implementation

Affected versions of this package are vulnerable to Arbitrary Code Injection through the ReactThemeStudioTemplateRenderer in packages/codegen-ui-react/lib/react-theme-studio-template-renderer.ts. An attacker can inject arbitrary JavaScript into generated .tsx output by supplying crafted theme schema keys that are passed to factory.createIdentifier() and emitted verbatim as source. This affects theme rendering for Studio-generated components, so a malicious or tampered theme definition can break generated code and execute attacker-controlled code during component rendering or build-time processing in developer, CI, browser, or SSR contexts.

CVSS Base Scores

version 4.0
version 3.1