Description
Babel is a compiler for writing next generation JavaScript. From 7.12.0 to before 7.29.4 and 8.0.0-alpha.13, using Babel to compile code that was specifically crafted by an attacker can cause Babel to generate output code that executes arbitrary code. This vulnerability is fixed in 7.29.4 and 8.0.0-alpha.13.
Published: 2026-05-26
Score: 8.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Babel is a JavaScript compiler that transpiles modern source code into browser‑compatible JavaScript. The vulnerability exists in the @babel/plugin-transform-modules-systemjs plugin; from Babel version 7.12.0 up to (but excluding) 7.29.4 and version 8.0.0‑alpha.13, the plugin does not adequately sanitize specially crafted input. Consequently, malicious source code can force Babel to emit arbitrary code in the compiled output. The flaw is rooted in improper control of code generation (CWE‑843) and a failure to reject unsafe payloads (CWE‑94). An attacker who supplies malicious source – for example, through a compromised npm package – can cause the resulting bundle to execute unintended code in any environment that runs the transpiled script.

Affected Systems

The fault affects the @babel:plugin-transform-modules-systemjs plugin used by the Babel compiler. All Babel distributions – whether the main babel package or the plugin itself – that run the affected plugin versions are impacted. Specifically, any installation of @babel/plugin-transform-modules-systemjs from version 7.12.0 through 7.29.3 (inclusive), and any pre‑release 8.0.0‑alpha.13 builds, is vulnerable. Upgrade to 7.29.4 or later, or to 8.0.0‑alpha.13 or later, eliminates the risk.

Risk and Exploitability

The CVSS score of 8.2 rates the issue as high severity, and the attack requires only the ability to influence the source code that is passed to the transpiler, which is often trivial for build pipelines that incorporate external packages. While the EPSS score is not available, the absence of a KEV listing indicates no confirmed exploits yet. However, the potential for arbitrary code execution and the breadth of affected versions make the vulnerability a serious threat, especially in open‑source or continuous‑integration environments where source may originate from untrusted origins. An attacker can therefore compromise the runtime of any application that consumes the compromised transpiled output.

Generated by OpenCVE AI on May 26, 2026 at 19:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest Babel release (7.29.4 or newer) and upgrade @babel/plugin-transform-modules-systemjs to 7.29.4 or newer.
  • Verify that no older plugin versions remain in the dependency tree and remove any vulnerable transpilations.
  • Restrict the sources of JavaScript files that are transpiled, using signed package verification or package lock enforcement, so that only trusted input reaches the compiler.

Generated by OpenCVE AI on May 26, 2026 at 19:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-fv7c-fp4j-7gwp @babel/plugin-transform-modules-systemjs generates arbitrary code when compiling malicious input
History

Tue, 26 May 2026 18:00:00 +0000

Type Values Removed Values Added
Description Babel is a compiler for writing next generation JavaScript. From 7.12.0 to before 7.29.4 and 8.0.0-alpha.13, using Babel to compile code that was specifically crafted by an attacker can cause Babel to generate output code that executes arbitrary code. This vulnerability is fixed in 7.29.4 and 8.0.0-alpha.13.
Title Improper Control of Generation of Code when compiling specifically crafted malicious code with @babel/plugin-transform-modules-systemjs
Weaknesses CWE-843
CWE-94
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-26T17:48:57.603Z

Reserved: 2026-05-07T18:04:17.309Z

Link: CVE-2026-44728

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-26T18:16:50.880

Modified: 2026-05-26T20:26:21.620

Link: CVE-2026-44728

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-26T19:30:13Z

Weaknesses