# Patch stimulus-bridge build RCE to 4.0.3

> Bump @symfony/stimulus-bridge to 4.0.3 for two build-time RCE paths (CVE-2026-133780, CVE-2026-133781).

Source: https://fullbytedeveloper.com/blog/patch-stimulus-bridge-build-rce
Published here: 2026-11-25

Two same-day GitHub advisories for `@symfony/stimulus-bridge` describe build-time remote code execution during Webpack or Symfony Encore builds. Both list floor 4.0.3. CVE ids on the advisory pages are CVE-2026-133780 and CVE-2026-133781. [1][2]

Related reading: [Refuse fake Claude npm packages](/blog/refuse-fake-claude-npm-packages), [Patch Laravel JSON DoS floors](/blog/patch-laravel-json-dos-floors) and [Patch simple-git --exec injection (CVE-2026-134815)](/blog/patch-simple-git-exec-injection). Browse the [Security topic](https://fullbytedeveloper.com/blog/topic/security).

## Confirm both GHSA ids and the CVEs

GHSA-hjg4-f74q-4w7h (2026-11-24): the `lazy-controller-loader` evaluated Stimulus magic comments with Node's `vm.runInNewContext()`. Crafted comments can break out and run arbitrary Node.js code in the build process. Severity High. Affected `<4.0.3`. Patched `4.0.3`. CVE ID: CVE-2026-133780. CVSS 4.0 vector on the advisory: `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`. [1]

GHSA-6rch-xhq6-7x8r (2026-11-24): the `controllers.json` loader `require()`s each listed package's `package.json`. Package `exports` can map `./package.json` to a script that `require()` runs during the Webpack or Encore build. Severity High with advisory overall score 7.3. Affected `<4.0.3`. Patched `4.0.3`. CVE ID: CVE-2026-133781. Same CVSS 4.0 vector string as path 1 on the advisory page. [2]

## Treat this as a CI and build problem

Path 1 can run attacker-controlled Node during the build when magic comments are evaluated. That can expose CI secrets or tamper with build artifacts before anything reaches a browser. [1]

Path 2 can run a script at build time even when npm install scripts are disabled, because the loader resolves `package.json` through the package exports map. [2]

Do not file this under "frontend XSS" when you brief the team. The saveable rule is build-time, not browser.

## Raise the package and check the lockfile

Raise `@symfony/stimulus-bridge` to 4.0.3 or newer for both advisories. [1][2]

Confirm what your tree actually resolves:

```bash
npm ls @symfony/stimulus-bridge
```

You should see 4.0.3 or a later release. If a transitive dependency still pins `<4.0.3`, fix that lockfile entry before the next CI build. [1][2]

## Keep both GHSA ids on the card

One floor covers two paths. When you write the change ticket, keep GHSA-hjg4-f74q-4w7h / CVE-2026-133780 and GHSA-6rch-xhq6-7x8r / CVE-2026-133781 on the same card so a reviewer does not close after reading only one advisory. [1][2]

Send this to the teammate who planned a vague "npm audit sometime" without writing floor 4.0.3 down.

## Sources

1. [GHSA-hjg4-f74q-4w7h (CVE-2026-133780): lazy-controller-loader vm.runInNewContext](https://github.com/symfony/stimulus-bridge/security/advisories/GHSA-hjg4-f74q-4w7h)
2. [GHSA-6rch-xhq6-7x8r (CVE-2026-133781): controllers.json package.json exports map](https://github.com/symfony/stimulus-bridge/security/advisories/GHSA-6rch-xhq6-7x8r)
