CVE-2026-73649
Velocity.js: Remote Code Execution via property-read to Function constructor (bypass of GHSA-j658-c2gf-x6pq fix)
Impact
Velocity.js is a JavaScript implementation of the Apache Velocity template engine. Prior to 2.1.7, the earlier fix for CVE-2026-44966 filtered constructor, __proto__, and prototype only in the #set assignment handler in src/compile/set.ts, while property-read expressions in src/compile/references.ts remained unfiltered. The getReferences() flow called getAttributes(), whose property access allowed an attacker-controlled template to traverse constructor.constructor to the JavaScript Function constructor. The #set handler validated only the assignment target and did not inspect the right-hand property-read expression, allowing arbitrary shell commands, environment-variable access, cloud-credential access, and internal-network access in the server process. This issue is fixed in version 2.1.7.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | velocityjs | <= 2.1.6 | 2.1.7 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-7gfh-x38p-prh3
- https://github.com/shepherdwind/velocity.js/security/advisories/GHSA-7gfh-x38p-prh3
- https://github.com/shepherdwind/velocity.js/pull/192
- https://github.com/shepherdwind/velocity.js/commit/f8e47a6c4607249b9c967d3a1ced959b4dd64dba
- https://github.com/shepherdwind/velocity.js/releases/tag/v2.1.7