<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh" -->

---
title: CVE-2026-133781 Build-time Code Execution in...
description: Symfony Stimulus Bridge versions before 4.0.3 let a malicious controller package run code during the build. The controllers.json loader loads each listed...
canonical: https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: CVE-2026-133781 Build-time Code Execution in @symfony/stimulus-bridge via a Controller Package That Maps Its package.json to a Script (Symfony Blog) | daily.dev
og:description: Symfony Stimulus Bridge versions before 4.0.3 let a malicious controller package run code during the build. The controllers.json loader loads each listed...
og:url: https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh
og:image: https://api.daily.dev/og/posts/4Y5n6gmYH.png
og:image:alt: CVE-2026-133781 Build-time Code Execution in @symfony/stimulus-bridge via a Controller Package That Maps Its package.json to a Script (Symfony Blog)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CVE-2026-133781 Build-time Code Execution in @symfony/stimulus-bridge via a Controller Package That Maps Its package.json to a Script (Symfony Blog)

**[Symfony](https://daily.dev/sources/symfony)** · 1 min read · 0 upvotes · 0 comments

## Summary

Symfony Stimulus Bridge versions before 4.0.3 let a malicious controller package run code during the build. The controllers.json loader loads each listed package's package.json with require(), and Node resolves that path through the package's exports field, which can map ./package.json to a script instead. require() then executes that script during the Webpack or Symfony Encore build, letting it read build files and environment variables like CI secrets and modify built assets, even when the package manager doesn't run install scripts. Version 4.0.3 fixes this by parsing the resolved file as JSON instead of executing it. Nicolas Grekas reported the issue.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://symfony.com/blog/cve-2026-133781-build-time-code-execution-in-at-symfony-stimulus-bridge-via-a-controller-package-that-maps-its-package-json-to-a-script>

## Questions this post answers

### What is CVE-2026-133781 in @symfony/stimulus-bridge?

It is a build-time code execution vulnerability in Symfony Stimulus Bridge versions before 4.0.3. The controllers.json loader loads each listed package's package.json using require(), but Node resolves that path through the package's exports field, which can map ./package.json to a script instead of JSON. require() then executes that script during the Webpack or Symfony Encore build.

_Teams patching Symfony UX dependencies can track advisories like this one on daily.dev._

### How do I fix the Symfony Stimulus Bridge package.json code execution vulnerability?

Upgrade to Symfony Stimulus Bridge 4.0.3 or later. The fix changes the controllers.json loader so it reads the resolved file and parses it strictly as JSON, meaning a mapped script fails to parse instead of executing during the build.

_daily.dev keeps developers current on dependency patches like this stimulus-bridge fix._

### Can a malicious npm package exploit the exports field to run code during a build without install scripts?

Yes, this is exactly how CVE-2026-133781 worked. A package can map ./package.json to a script inside its exports field, so code that does require() on that path executes the script during the build, even when the package manager is configured not to run install scripts, allowing access to CI secrets and build files.

_Developers auditing build-time supply chain risks follow writeups like this on daily.dev._

## Similar posts on daily.dev

- [CVE-2026-49216: XSS in symfony/ux-autocomplete via unescaped AJAX response data \(Symfony Blog\)](https://daily.dev/posts/cve-2026-49216-xss-in-symfony-ux-autocomplete-via-unescaped-ajax-response-data-symfony-blog--be5s2bwyd) · Symfony · 0 upvotes · 0 comments
- [Malicious Postinstall Hook Found Across 700\+ GitHub Reposito...](https://daily.dev/posts/malicious-postinstall-hook-found-across-700-github-reposito--a4oaimw4h) · Socket · 0 upvotes · 0 comments
- [Symfony UX 3.8.1 and 2.36.3 released \(Symfony Blog\)](https://daily.dev/posts/symfony-ux-3-8-1-and-2-36-3-released-symfony-blog--x0cyrmpoj) · Symfony · 0 upvotes · 0 comments
- [Composer 2.9.6 Fixes Two Perforce Command Injection Vulnerabilities](https://daily.dev/posts/composer-2-9-6-fixes-two-perforce-command-injection-vulnerabilities-1cyx9zwzx) · Laravel News · 25 upvotes · 3 comments

---

Tags: [#cyber](https://daily.dev/tags/cyber), [#php](https://daily.dev/tags/php), [#symfony](https://daily.dev/tags/symfony), [#webpack](https://daily.dev/tags/webpack)

[View this post on daily.dev](https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"CVE-2026-133781 Build-time Code Execution in @symfony/stimulus-bridge via a Controller Package That Maps Its package.json to a Script (Symfony Blog)","url":"https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh"},"datePublished":"2026-11-24T09:01:47.215Z","dateModified":"2026-11-24T09:02:11.596Z","description":"Symfony Stimulus Bridge versions before 4.0.3 let a malicious controller package run code during the build. The controllers.json loader loads each listed...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/327b244859fddae8f3a20d0225898aa0?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/327b244859fddae8f3a20d0225898aa0?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Symfony","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Symfony","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/cc07051b7112472f9729e73c14660a64","url":"https://daily.dev/sources/symfony"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cyber,php,symfony,webpack","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Symfony","item":"https://daily.dev/sources/symfony"},{"@type":"ListItem","position":3,"name":"CVE-2026-133781 Build-time Code Execution in @symfony/stimulus-bridge via a Controller Package That Maps Its package.json to a Script (Symfony Blog)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/cve-2026-133781-build-time-code-execution-in-symfony-stimulus-bridge-via-a-controller-package-that--4y5n6gmyh#faq","mainEntity":[{"@type":"Question","name":"What is CVE-2026-133781 in @symfony/stimulus-bridge?","acceptedAnswer":{"@type":"Answer","text":"It is a build-time code execution vulnerability in Symfony Stimulus Bridge versions before 4.0.3. The controllers.json loader loads each listed package's package.json using require(), but Node resolves that path through the package's exports field, which can map ./package.json to a script instead of JSON. require() then executes that script during the Webpack or Symfony Encore build. Teams patching Symfony UX dependencies can track advisories like this one on daily.dev."}},{"@type":"Question","name":"How do I fix the Symfony Stimulus Bridge package.json code execution vulnerability?","acceptedAnswer":{"@type":"Answer","text":"Upgrade to Symfony Stimulus Bridge 4.0.3 or later. The fix changes the controllers.json loader so it reads the resolved file and parses it strictly as JSON, meaning a mapped script fails to parse instead of executing during the build. daily.dev keeps developers current on dependency patches like this stimulus-bridge fix."}},{"@type":"Question","name":"Can a malicious npm package exploit the exports field to run code during a build without install scripts?","acceptedAnswer":{"@type":"Answer","text":"Yes, this is exactly how CVE-2026-133781 worked. A package can map ./package.json to a script inside its exports field, so code that does require() on that path executes the script during the build, even when the package manager is configured not to run install scripts, allowing access to CI secrets and build files. Developers auditing build-time supply chain risks follow writeups like this on daily.dev."}}]}
```

