{"answers":{"affected":"2 open source packages ship an affected version, including @aws-amplify/codegen-ui-react.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-4318 exists.","fix":"Upgrade @aws-amplify/codegen-ui-react to 2.20.3 or later.","what":"CVE-2025-4318 is a critical code injection vulnerability in Amazon Amplify Studio, published on 5 May 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-4318 and fix it if it is affected.\n\nWhat it is: CVE-2025-4318 is a critical code injection vulnerability in Amazon Amplify Studio, published on 5 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-4318 exists.\n\nAffected packages and fixed versions:\n- @aws-amplify/codegen-ui-react (npm): affected all versions; fixed in 2.20.3\n- @aws-amplify/codegen-ui-react (npm): affected all versions; fixed in 2.20.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-4318/ (Markdown: https://insights.sbomify.com/CVE-2025-4318/index.md)","id":"CVE-2025-4318","markdown":"https://insights.sbomify.com/CVE-2025-4318/index.md","name":"CVE-2025-4318","record":{"aliases":["GHSA-hf3j-86p7-mfw8"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"AWS Amplify Studio UI","requires_auth":"low_privilege","summary":"Authenticated users can execute arbitrary JavaScript code via unvalidated UI component property expressions in AWS Amplify Studio.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"AMZN","cpe":[],"cvss":{"score":9,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","version":"4.0"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"description":"The AWS Amplify Studio UI component property expressions in the aws-amplify/amplify-codegen-ui package lack input validation. This could potentially allow an authenticated user who has access to create or modify components to run arbitrary JavaScript code during the component rendering and build process.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Input validation issue in AWS Amplify Studio UI component properties","id":"CVE-2025-4318","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":2,"n_references":3,"next":{"headline":"Improper Access Control in Birebirsoft's Sufirmam","id":"CVE-2025-4319"},"packages":[{"ecosystem":"npm","fixed":["2.20.3"],"introduced":["0"],"last_affected":[],"package":"@aws-amplify/codegen-ui-react","purl":null,"source":"GHSA-hf3j-86p7-mfw8"},{"ecosystem":"npm","fixed":["2.20.3"],"introduced":["0"],"last_affected":[],"package":"@aws-amplify/codegen-ui-react","purl":"pkg:npm/%40aws-amplify/codegen-ui-react","source":"GHSA-hf3j-86p7-mfw8"}],"prev":{"headline":"TheGem \u003c= 5.10.3 - Authenticated (Subscriber+) Arbitrary File Upload","id":"CVE-2025-4317"},"products":["Amplify Studio"],"published":"2025-05-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-29","vendors":["Amazon"]},"summary":"Authenticated users can execute arbitrary JavaScript code via unvalidated UI component property expressions in AWS Amplify Studio.","url":"https://insights.sbomify.com/CVE-2025-4318/"}