CVE-2025-4318
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.
https://nvd.nist.gov/vuln/detail/CVE-2025-4318
Categories
CWE-95 : Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval"). Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.) If possible, refactor your code so that it does not need to use eval() at all. Framework for LLM applications allows eval injection via a crafted response from a hosting provider. Python compiler uses eval() to execute malicious strings as Python code. Chain: regex in EXIF processor code does not correctly determine where a string ends (CWE-625), enabling eval injection (CWE-95), as exploited in the wild per CISA KEV. Chain: backslash followed by a newline can bypass a validation step (CWE-20), leading to eval injection (CWE-95), as exploited in the wild per CISA KEV. Eval injection in PHP program. Eval injection in Perl program. Eval injection in Perl program using an ID that should only contain hyphens and numbers. Direct code injection into Perl eval function. Eval injection in Perl program. Direct code injection into Perl eval function. Direct code injection into Perl eval function. MFV. code injection into PHP eval statement using nested constructs that should not be nested. MFV. code injection into PHP eval statement using nested constructs that should not be nested. Code injection into Python eval statement from a field in a formatted file. Eval injection in Python program. chain: Resultant eval injection. An invalid value prevents initialization of variables, which can be modified by attacker and later injected into PHP eval statement. Chain: Execution after redirect triggers eval injection.
References
134c704f-9b21-4f2e-91b3-4a467353bcc0
af854a3a-2127-422b-91ae-364da2661108
ff89ba41-3aa1-4d27-914a-91399e9639e5
CPE
REMEDIATION
EXPLOITS
Exploit-db.com
id |
description |
date |
|
No known exploits |
POC Github
Other Nist (github, ...)
CAPEC
Common Attack Pattern Enumerations and Classifications
id |
description |
severity |
35 |
Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. |
Very High |
MITRE
Techniques
id |
description |
T1027.006 |
Obfuscated Files or Information: HTML Smuggling |
T1027.009 |
Obfuscated Files or Information: Embedded Payloads |
T1564.009 |
Hide Artifacts: Resource Forking |
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. |
Mitigations
id |
description |
M1048 |
Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist.
|
M1040 |
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent execution of potentially obfuscated scripts. |
M1013 |
Configure applications to use the application bundle structure which leverages the <code>/Resources</code> folder location. |
© 2022 The MITRE Corporation. Esta obra se reproduce y distribuye con el permiso de The MITRE Corporation. |
Cybersecurity needs ?
Strengthen software security from the outset with our DevSecOps expertise
Integrate security right from the start of the software development cycle for more robust applications and greater customer confidence.
Our team of DevSecOps experts can help you secure your APIs, data pipelines, CI/CD chains, Docker containers and Kubernetes deployments.
Discover this offer