GHSA-hf3j-86p7-mfw8
GHSA-hf3j-86p7-mfw8 is a CWE-95 vulnerability in @aws-amplify/codegen-ui-react. O3 Security confirms whether GHSA-hf3j-86p7-mfw8 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
AWS Amplify Studio UI Component Properties Has an Input Validation Issue
Blast Radius
@aws-amplify/codegen-ui-reactReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The AWS Amplify Studio amplify-codegen-ui is a package that generates front-end code from UI Builder entities (components, forms, views, and themes) primarily used in AWS Amplify Studio for component previews and in AWS Command Line Interface (AWS CLI) for generating component files in customers' local applications.
An issue exists in the Amplify Studio property binding process of the amplify-codegen-ui package that could potentially allow an authenticated user to run arbitrary JavaScript code during the component rendering and build process.
Impact
When importing a component schema using the create-component command, Amplify Studio will import and generate the component on the users' behalf. The expression-binding function does not validate the component schema properties before converting them to expressions. As a result, an authenticated user who can create or modify components could run arbitrary JavaScript code during the component rendering and build process.
Impacted versions: <=2.20.2
Patches
This issue has been addressed partially in version 2.20.3 and additional fixes in 2.20.4. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
Workarounds
There are no workarounds. Upgrade to version 2.20.4.
If you have any questions or comments about this advisory, AWS asks that you contact AWS/Amazon Security via the issue-reporting page or directly via email to [email protected]. Please do not create a public GitHub issue.
Credit
AWS would like to thank ray the bounty hunter for collaborating on this issue through the coordinated issue disclosure process.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @aws-amplify/codegen-ui-react | all versions | 2.20.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @aws-amplify/codegen-ui-react. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update @aws-amplify/codegen-ui-react to 2.20.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hf3j-86p7-mfw8 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-hf3j-86p7-mfw8 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-hf3j-86p7-mfw8. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-hf3j-86p7-mfw8 in your dependencies?
O3 detects GHSA-hf3j-86p7-mfw8 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.