Skip to main content

Improper Control of Generation of Code ('Code Injection')

CVE-2026-55388

Severity High
Score 8.1/10

Summary

`piscina`'s constructor and `run()` paths read the `filename` option via plain member access. Both reads fall through the prototype chain when the caller's options object doesn't have filename as an own property. When Object.prototype.filename is polluted upstream -- by any of the well-documented PP-source CVEs (lodash<4.17.13, qs<6.10.3, set-value<4.1.0, minimist<1.2.6, deepmerge<4.2.2, and others) -- the inherited value flows to worker_threads.Worker import and the attacker's .mjs runs in the worker. Subtlety: calling pool.run(task) with no second arg uses kDefaultRunOptions which has filename: null as an OWN property -- that path DOES NOT fire. The vulnerable shape is when the caller passes their own options object (commonly {signal: ac.signal} for abort support, {name: ...} for task labelling, etc.). These caller-built options objects inherit from Object.prototype unless the caller explicitly uses Object.create(null). This issue affects prior to 4.9.3, 5.0.0-alpha.0 prior to 5.2.0 and 6.0.0-rc.1 prior to 6.0.0-rc.2.

  • HIGH
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • HIGH

CWE-94 - Code Injection

Code injection is a type of vulnerability that allows an attacker to execute arbitrary code. This vulnerability fully compromises the machine and can cause a wide variety of security issues, such as unauthorized access to sensitive information, manipulation of data, denial of service attacks etc. Code injection is different from command injection in the fact that it is limited by the functionality of the injected language (e.g. PHP), as opposed to command injection, which leverages existing code to execute commands, usually within the context of a shell.

References

Advisory Timeline

  • Published