Build-time Code Execution in @symfony/stimulus-bridge via a Controller Package That Maps Its package.json to a Script
NIST has not reviewed this entry yet, so scores and affected versions may be missing or may change.
The controllers.json loader of @symfony/stimulus-bridge loads the package.json file of each package listed in controllers.json with require(). Node resolves this path through the exports field of the package, which can map ./package.json to a script. require() then runs that script during the Webpack or Symfony Encore build. This is a build-time vulnerability: it doesn't affect browsers or end users. A malicious or compromised package listed in controllers.json can run code on the developer machine or the CI server. This works even when the package manager doesn't run install scripts. This code can read the files and environment variables of the build, like CI secrets, and change the built assets. The loader now reads the resolved file and parses it as JSON, so that a mapped script fails to parse instead of running.
Inclusion of Functionality from Untrusted Control Sphere CWE-829
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
Weakness data: MITRE Common Weakness Enumeration.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Symfony @symfony/stimulus-bridge | Software | from 0, before 4.0.3 | 4.0.3 |
The 7.3 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Setup needed on the target | Present | The target has to be set up in a particular way. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | Passive | A person has to do something simple, such as view a page. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
NIST lists 3 sources for this flaw, none tagged as a vendor patch.