Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. angular-expressions
  4. ›
  5. CVE-2024-54152

CVE-2024-54152: Angular Expressions - Remote Code Execution when using locals

December 10, 2024

An attacker can write a malicious expression that escapes the sandbox to execute arbitrary code on the system.

Example of vulnerable code:

const expressions = require("angular-expressions");
const result = expressions.compile("__proto__.constructor")({}, {});
// result should be undefined, however for versions <=1.4.2, it returns an object.

With a more complex (undisclosed) payload, one can get full access to Arbitrary code execution on the system.

References

  • github.com/advisories/GHSA-5462-4vcx-jh7j
  • github.com/peerigon/angular-expressions
  • github.com/peerigon/angular-expressions/commit/97f7ad94006156eeb97fc942332578b6cfbf8eef
  • github.com/peerigon/angular-expressions/security/advisories/GHSA-5462-4vcx-jh7j
  • nvd.nist.gov/vuln/detail/CVE-2024-54152

Code Behaviors & Features

Detect and mitigate CVE-2024-54152 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.4.3

Fixed versions

  • 1.4.3

Solution

Upgrade to version 1.4.3 or above.

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/angular-expressions/CVE-2024-54152.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:17 +0000.