Read the docs

Code execution in @symfony/stimulus-bridge via magic comments

Priority LOW 34CWE-94Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

The @symfony/stimulus-bridge package before 4.0.3 evaluates Stimulus magic comments as JavaScript in its lazy-controller-loader Webpack loader. A crafted comment (CWE-94) escapes the Node.js vm context, which is not a security sandbox. An attacker who can get a malicious controller file into a Webpack or Symfony Encore build, such as through a compromised dependency, can run arbitrary code with the build user's permissions.

Written with Claude Haiku 5.5 from the sources below · 2026-11-24

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00355 21st percentileScored 2026-11-30
Fix Fixed @symfony/stimulus-bridge (Symfony): 4.0.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfony@symfony/stimulus-bridgebefore 4.0.34.0.3Patch availableCNA
  • @symfony/stimulus-bridge Vendorsymfony Affected before 4.0.3 Fixed in 4.0.3 Patch available CNA

Remediation

Update @symfony/stimulus-bridge to 4.0.3, which parses magic comments as literal values and rejects non-literal expressions instead of evaluating them.

Written with Claude Haiku 5.5 from the sources below · 2026-11-24

  • Fix · CNA @symfony/stimulus-bridge (Symfony) Fixed in 4.0.3

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    Symfony @symfony/stimulus-bridge 4.0.3

    2 records Highest priority Priority LOW 2 LOW

    Other records, highest priority first

    • TI-2026-97176 Build-time Code Execution in @symfony/stimulus-bridge via Mapped package.jsonPriority LOW 33

Timeline

  1. 2026-11-24 Threatist record created from CVE-2026-133780
  2. 2026-11-25 CISA SSVC decision points changed

References

  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2022-08704 Symfony storing cookie headers in HttpCache CVSS 3.1HIGH 8.8
  • TI-2026-98149 Symfony Serializer CSV Header Nesting Without Limit Crashes PHP CVSS 4.0HIGH 8.7
  • TI-2026-98148 Nested short ternaries make the Symfony expression parser hang CVSS 4.0HIGH 8.7
See all 129 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences