CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-4318

CVE-2025-4318: Remote Code Execution in AWS Amplify codegen-ui

Alon Barad
Alon Barad
Software Engineer

Jul 30, 2026·5 min read·58 visits

Executive Summary (TL;DR)

Remote code execution vulnerability in @aws-amplify/codegen-ui allows authenticated users to execute arbitrary commands during build/generation phases via crafted component schemas.

A critical remote code execution (RCE) vulnerability exists in AWS Amplify Studio's code-generation library (@aws-amplify/codegen-ui). An authenticated attacker with permissions to create or modify component schemas can inject malicious JavaScript code into those schemas. When the Amplify CLI or the build environment processes these schemas, the unvalidated expressions are executed within the host Node.js environment, leading to full system compromise.

Vulnerability Overview

The @aws-amplify/codegen-ui and @aws-amplify/codegen-ui-react packages are core components utilized by AWS Amplify Studio to generate React components, forms, and other frontend views from UI Builder schemas. These UI Builder schemas are represented as JSON files that describe layout properties and interactions.\n\nThis library exposes an attack surface during the compilation phase, where local developer machines, rendering preview servers, or CI/CD pipelines run the codegen execution tools. If an attacker can manipulate these schemas, they can embed malicious JavaScript code directly into property fields and event bindings.\n\nBecause the code generation occurs in a standard Node.js context, any dynamically parsed code is executed with the privileges of the active shell process. This bypasses typical client-side security measures, enabling the attacker to pivot from modifying front-end schemas to executing arbitrary system commands on the compile target.

Root Cause Analysis

The root cause of CVE-2025-4318 is improper neutralization of directives in dynamically evaluated code, classified under CWE-95. When processing JSON schemas, the @aws-amplify/codegen-ui compiler converts user-supplied configurations into React AST nodes without validating or sanitizing the input keys and parameters.\n\nInitially, versions up to 2.20.2 parsed the dynamic properties of UI schemas and generated dynamic execution blocks using unsafe eval-like capabilities within Node.js. This allowed an attacker to supply standard library commands (such as those involving child_process and fs) inside property bindings, which the engine executed during compilation.\n\nAlthough the development team attempted to mitigate this in version 2.20.3 by introducing a list of blocked scripting patterns (scriptingPatterns), the sanitation check was incomplete. The initial patch only filtered base properties, while other critical fields, specifically event handler fields like bindingEvent, remained completely unvalidated, leading to bypass vectors that were not solved until version 2.20.4.

Code Analysis

Analyzing the patch history reveals the evolution of the fix. In version 2.20.3, developers added a denylist-based sanitation helper to filter out dangerous JavaScript keywords and DOM manipulation syntax from component properties.\n\ntypescript\n// Denylist check in packages/codegen-ui-react/lib/utils/constants.ts\nexport const scriptingPatterns = [\n /eval\\s*\\(/i,\n /Function\\s*\\(/i,\n /setTimeout\\s*\\(/i,\n /new\\s+Function/i,\n /require\\s*\\(/i,\n /__proto__/i,\n /\\$\\{/i\n];\n\n\nHowever, event binding compilation did not use this helper, leaving event workflows vulnerable to injection. In version 2.20.4, the fix was completed by wrapping the bindingEvent compile phase in the sanitation pipeline as shown below:\n\ntypescript\n// Fixed code in packages/codegen-ui-react/lib/workflow/events.ts\nexport function buildBindingEvent(\n componentType: string,\n event: BoundStudioComponentEvent,\n eventName: string,\n): JsxAttribute {\n // Sanitization applied to event.bindingEvent via escapePropertyValue\n const sanitizedBindingEvent = escapePropertyValue(event.bindingEvent);\n const expr = factory.createIdentifier(sanitizedBindingEvent);\n return factory.createJsxAttribute(\n factory.createIdentifier(mapGenericEventToReact(componentType as Primitive, eventName as StudioGenericEvent)),\n factory.createJsxExpression(undefined, expr),\n );\n}\n\n\nBy forcing the event.bindingEvent value through the escapePropertyValue helper, any malicious pattern returning true on the scriptingPatterns regular expression is neutralized, preventing the execution of arbitrary Node.js scripts.

Exploitation Methodology

Exploitation of CVE-2025-4318 begins with an attacker gaining lower-privileged authenticated access to AWS Amplify Studio. The attacker then targets a UI component, preparing a malicious component schema that contains system commands mapped to standard parameters like bindingEvent inside buttons or other forms.\n\nmermaid\ngraph LR\n Attacker[\"Attacker (Low Privilege)\"] -->|Uploads Malicious Schema| AmplifyStudio[\"AWS Amplify Studio\"]\n AmplifyStudio -->|Syncs Schema| DevMachine[\"Developer Machine (amplify pull)\"]\n DevMachine -->|Runs codegen-ui Compiler| Execution[\"Node.js execution of arbitrary commands\"]\n\n\nWhen a developer or a automated CI/CD pipeline agent runs amplify pull or standard code-generation tasks, the local compiler fetches the compromised remote JSON schema from the cloud configuration. During AST compilation, the injected JavaScript expressions are evaluated within the host machine's Node.js shell context.\n\nBecause the host environment runs with local user context, the executed command has full access to the machine's file system, environment variables, and network layer. This allows an attacker to exfiltrate active cloud credential tokens, environment configurations, and source code directly to external command-and-control servers.

Impact Assessment

The impact of this vulnerability is critical, as reflected in its CVSS score of 9.0. It allows authenticated low-privileged users to pivot into remote code execution on the local workstations of any developer working on the project or the host build machines of associated automated pipelines.\n\nSince developers often run shell sessions with persistent AWS CLI profiles, an attacker can harvest credentials stored in environment variables or within standard configuration files. Similarly, CI/CD pipeline targets (e.g., AWS CodeBuild or GitHub Actions runners) possess broad IAM and repository write privileges, creating risks of supply chain poisoning.\n\nThrough this execution pattern, a compromise can spread downstream to other applications and infrastructure. Organizations using unpatched @aws-amplify/codegen-ui dependencies are highly vulnerable to repository tampering and database access exfiltration, because code execution occurs seamlessly during routine code-generation steps.

Remediation & Mitigation

To address CVE-2025-4318 completely, development and security teams must upgrade all instances of @aws-amplify/codegen-ui and @aws-amplify/codegen-ui-react to version 2.20.4 or higher. Any transitive dependencies should also be refreshed.\n\nProjects using lockfiles should run command sequences to verify that the locked versions are resolved above the vulnerable threshold. In situations where an immediate package upgrade is impossible, teams should restrict permissions in AWS Amplify Studio to block unauthorized users from creating or editing component models.\n\nFurthermore, code-generation pipelines should execute within restricted container sandboxes that block outbound internet access except to authorized endpoints. This severely limits the utility of an exploit by preventing outbound data exfiltration or reverse shells.

Official Patches

AWS AmplifyProperties Sanitization Fix
AWS AmplifyEvents Sanitization Fix

Fix Analysis (2)

Technical Appendix

CVSS Score
9.0/ 10
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
EPSS Probability
0.92%
Top 43% most exploited

Affected Systems

AWS Amplify Studio UI Builder@aws-amplify/codegen-ui@aws-amplify/codegen-ui-react

Affected Versions Detail

Product
Affected Versions
Fixed Version
@aws-amplify/codegen-ui
AWS
>= 0.1.0, < 2.20.42.20.4
@aws-amplify/codegen-ui-react
AWS
>= 0.1.0, < 2.20.42.20.4
AttributeDetail
CWE IDCWE-95
Attack VectorNetwork
Privileges RequiredLow
User InteractionNone
ImpactHigh (Confidentiality, Integrity, Availability)
Exploit StatusPoC available
KEV StatusNot listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1203Exploitation for Client Execution
Execution
CWE-95
Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

The product receives input from an upstream component, but does not neutralize or incorrectly neutralizes code syntax before dynamic evaluation.

Known Exploits & Detection

SecureLayer7Detailed write-up of the initial RCE and the event binding bypass.

Vulnerability Timeline

Patch for properties initial injection released (v2.20.3)
2025-04-10
AWS Security Bulletin AWS-2025-010 and CVE-2025-4318 published
2025-05-05
SecureLayer7 publishes technical vulnerability analysis
2025-06-05
Event binding injection patch released (v2.20.4)
2026-02-24

References & Sources

  • [1]AWS Security Advisory AWS-2025-010
  • [2]GitHub Security Advisory GHSA-hf3j-86p7-mfw8
  • [3]SecureLayer7 Technical Vulnerability Analysis

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•12 minutes ago•CVE-2026-106451
7.3

CVE-2026-106451: Local Privilege Escalation via JNI Extraction TOCTOU in lz4-java

A local privilege escalation and code execution vulnerability exists in the yawkat fork of lz4-java when extracting its bundled JNI shared library into the system temporary directory. Predictable path derivation and lack of exclusive file creation flags allow a local attacker to hijack library loading via a race condition.

Alon Barad
Alon Barad
1 views•6 min read
•about 1 hour ago•CVE-2026-105698
5.4

CVE-2026-105698: Missing Authorization in Deprecated Chat Vertices Endpoints in Langflow

A missing authorization vulnerability in Langflow versions 1.0.0 through 1.10.0 allows authenticated users (and unauthenticated users in versions prior to 1.7.2) to access private workflow structures and execute graph components by targeting deprecated API endpoints.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 2 hours ago•CVE-2026-105697
9.9

CVE-2026-105697: OS Command Injection in Langflow Model Context Protocol Integration

A critical OS command injection vulnerability exists in Langflow's Model Context Protocol (MCP) server integration using stdio transport, allowing unauthenticated remote command execution under default configurations.

Alon Barad
Alon Barad
5 views•5 min read
•about 3 hours ago•CVE-2026-105745
6.7

CVE-2026-105745: Arbitrary Code Execution via Malicious Entrypoint Discovery in Docling base_factory

Docling prior to version 2.131.0 is vulnerable to arbitrary local code execution during module initialization due to incorrect order of operations in its plugin discovery system. Even when the default option to reject external plugins is active, Docling utilizes Pluggy to scan and import entrypoints before performing namespace validation.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 4 hours ago•CVE-2026-105749
6.5

CVE-2026-105749: Unbounded Table Attributes in Docling Backends Leads to Resource Exhaustion

An uncontrolled resource consumption vulnerability exists in the Docling document conversion library. Maliciously structured HTML, JATS, ODS, or BoxNote inputs containing table cells with excessively large 'rowspan' or 'colspan' attribute values trigger algorithmic complexity conditions. This allows unauthenticated remote attackers to initiate resource exhaustion states, crashing or hanging the target document processing pipeline while bypassing configured timeouts.

Amit Schendel
Amit Schendel
10 views•6 min read
•about 5 hours ago•CVE-2026-105748
4.3

CVE-2026-105748: Local File Inclusion and Arbitrary File Disclosure in Docling Document Parser

A Local File Inclusion (LFI) and Arbitrary File Disclosure vulnerability exists in Docling and Docling Slim versions >= 2.16.0 up to 2.131.0. When parsing serialized DoclingDocument structures using the JSON input format, the backend fails to restrict image URI schemes, allowing remote attackers to retrieve local files and verify path existence on the host system during embedded document export.

Amit Schendel
Amit Schendel
6 views•5 min read