CVE-2026-133780: @symfony/stimulus-bridge lazy-controller-loader: arbitrary code execution via unsanitized Stimulus magic comments

Published Nov 24, 2026
·
Updated

The @symfony/stimulus-bridge npm package includes a Webpack loader called lazy-controller-loader that supports "magic comments" placed above a Stimulus controller import, for example / stimulusFetch: 'lazy' /, to control lazy loading behavior. To read those options, the loader extracted the raw text of any stimulus comment and evaluated it as JavaScript using Node's vm.runInNewContext(). The Node.js node:vm module is not a security sandbox, and a crafted comment can break out of the VM context using well-known techniques to run arbitrary Node.js code within the build process.

This is a build-time vulnerability: it does not affect browsers or end users. The code executes on the developer machine or CI/build server during a Webpack or Symfony Encore build. Realistic attack vectors include a malicious Stimulus controller introduced through a compromised dependency, or a pull request that triggers an automated CI build. An attacker who can get such a file into the build can read files and environment variables available to the build process, exfiltrate CI secrets, tamper with generated build artifacts, and run commands with the permissions of the build user.

The loader no longer evaluates comment content as JavaScript. It now parses each comment as an object expression using a real JavaScript parser and extracts only plain literal values. Any non-literal value, such as a function call, an identifier, or a sequence expression, is rejected and reported as a build error instead of being executed. Legitimate option values like 'lazy' and 'eager' continue to work without any changes required on the user's side.

Affected Software

1 affected component
npm/@symfony/stimulus-bridge

Event History

Nov 24, 2026
CVE Published
via MITRE·08:41 AM
Data Sourced
via MITRE·08:41 AM
DescriptionWeakness
Data Sourced
via NVD·09:17 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which environments are exposed to this issue?

Only systems that run a Webpack or Symfony Encore build using the affected loader are exposed. Exploitation occurs in the build process on a developer workstation or CI/build server, not in browsers or against application end users.

2

What must an attacker be able to do to exploit it?

An attacker must get a crafted Stimulus controller file containing a malicious stimulus* magic comment into a build. Realistic paths include a compromised dependency or a pull request that causes an automated CI build to run.

3

What could an attacker access after successful exploitation?

Code runs with the permissions of the build user. The attacker may read files and environment variables available to that process, exfiltrate CI secrets, modify generated build artifacts, and run commands.

4

How can teams reduce risk while they investigate or update?

Treat untrusted controller sources and dependency updates as unsafe to build, particularly in CI. Avoid running builds triggered by untrusted pull requests with credentials or secrets available to the build process.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203