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·6 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

•21 minutes ago•CVE-2026-67425
8.6

CVE-2026-67425: Insecure Credential Forwarding in Flyto2 Core

An insecure credential forwarding vulnerability in Flyto2 Core prior to version 2.26.6 allows attackers to exfiltrate operator API keys. This occurs because the system forwards environment-derived API keys to user-controlled custom endpoints, bypassing SSRF guards designed only for private target validation.

Amit Schendel
Amit Schendel
1 views•6 min read
•about 2 hours ago•CVE-2026-67426
9.3

CVE-2026-67426: Unauthenticated Remote Code Execution and Secret Exfiltration in Flyto2 Core

CVE-2026-67426 is a critical vulnerability in Flyto2 Core prior to version 2.26.7. The standalone flyto-verification service binds to all interfaces (0.0.0.0) on port 8344 and exposes an unauthenticated POST /run endpoint. This endpoint accepts an arbitrary client-controlled callback URL and makes an outbound POST request containing the sensitive internal runner secret in the headers. Attackers can exploit this to retrieve the FLYTO_RUNNER_SECRET and perform Server-Side Request Forgery (SSRF) against internal network targets.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 3 hours ago•CVE-2026-66066
9.8

CVE-2026-66066: Pre-Authentication Arbitrary File Read and Remote Code Execution in Ruby on Rails Active Storage

CVE-2026-66066 (popularly known as 'KindaRails2Shell') is a critical security vulnerability in the Active Storage component of Ruby on Rails. The vulnerability arises from an insecure default integration with the libvips image processing library via the ruby-vips gem. Under default configurations, Active Storage fails to restrict untrusted format loaders within libvips, allowing remote, unauthenticated attackers to upload malformed files that leverage external dataset features to read local server files. By extracting cryptographic secrets such as SECRET_KEY_BASE from the leaked file contents, attackers can forge signed Marshal serialization payloads to achieve remote code execution.

Alon Barad
Alon Barad
6 views•6 min read
•about 4 hours ago•CVE-2026-54722
8.7

CVE-2026-54722: Server-Side Request Forgery (SSRF) Bypass via Userinfo Stripping in dssrf-js

An SSRF validation bypass exists in dssrf-js (v1.0.3 and prior) due to an improper string normalization sequence inside is_url_safe. Before validating the host using Node's WHATWG parser, the helper strips the '@' symbol. This corrupts the parser's authority resolution, while the application's client requests the original, un-sanitized string containing internal IP targets.

Alon Barad
Alon Barad
5 views•6 min read
•about 5 hours ago•CVE-2026-54522
2.1

CVE-2026-54522: Same-Process Use-After-Free and Cross-Buffer Data Disclosure in msgpack-ruby

A Use-After-Free (UAF) vulnerability exists in msgpack-ruby prior to version 1.8.2. The MessagePack::Buffer#clear method returns the associated 4 KiB rmem page to the shared pool but fails to reset the buffer's tracking pointers (rmem_last, rmem_end, and rmem_owner). Subsequent write operations on the cleared buffer can alias the freed page, allowing concurrent buffers to access, disclose, or corrupt cross-buffer data. This issue is resolved in version 1.8.2.

Alon Barad
Alon Barad
7 views•5 min read
•about 6 hours ago•CVE-2026-67428
8.5

CVE-2026-67428: Server-Side Request Forgery in Flyto2 Core HTTP-Emitting Modules

Flyto2 Core (flyto-core) prior to version 2.26.7 did not utilize its centralized SSRF validation mechanism ('validate_url_with_env_config') across multiple HTTP-emitting modules. This oversight allowed low-privileged users executing automated workflows to perform Server-Side Request Forgery (SSRF) attacks against internal endpoints, loopback interfaces, and cloud provider metadata services.

Alon Barad
Alon Barad
7 views•5 min read