Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2026-73649 — velocityjs

CRITICALFix: shepherdwind/velocity.js@f8e47a6

CVE-2026-73649 is a critical-severity (CVSS 9.8) Code Injection vulnerability in velocityjs. A fix is available for velocityjs — see the affected versions and patch details below.

Velocity.js: Remote Code Execution via property-read to Function constructor (bypass of CVE-2026-44966 fix)

Also known asGHSA-7gfh-x38p-prh3
Published
Aug 13, 2026
Updated
Sep 20, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 28, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs52th percentile — riskier than 52% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-73649 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 247,569 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
📦velocityjs

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Remote Code Execution (RCE) in velocityjs v2.1.6 via property-read to the Function constructor. This bypasses the fix for GHSA-j658-c2gf-x6pq ("Prototype Pollution in #set path assignment") — that advisory blocked constructor/proto/prototype only in the #set assignment handler (set.cjs), but property read expressions are unfiltered. Any application rendering attacker-controlled Velocity templates is vulnerable to arbitrary code execution on the server.

Details

GHSA-j658-c2gf-x6pq added isBlockedPathKey() to dist/cjs/compile/set.cjs:35-43, which blocks proto, constructor, and prototype keys. However, this check only runs when the #set directive assigns a value — it validates the assignment target path, not the value expression being evaluated. The value expression is evaluated via getReferences() in dist/cjs/compile/references.cjs:16, which calls getAttributes() at line 81. The property access at line 88-89 has no filtering: // references.cjs:81-91 getAttributes(property, baseRef, ast) { if (property.type === "property") { return baseRef[property.id]; // ← NO BLOCK on "constructor", "prototype", etc. } ... } Meanwhile, set.cjs:35-43 properly blocks these keys, but only for the #set target: // set.cjs:35-43 isBlockedPathKey(baseRef, key, isEnd) { if (key === PROTO_KEY) return true; // "proto" if (key === "prototype" && typeof baseRef === "function") return true; return !isEnd && PROTOTYPE_CHAIN_KEYS.has(key) && !hasOwnProperty(baseRef, key); } The exploit chain:

  1. $x.constructor → getAttributes() → {}["constructor"] → Object
  2. .constructor → getAttributes() → Object["constructor"] → Function
  3. ("return process.mainModule.require('child_process').execSync('whoami')") → calls Function(...) → creates a function
  4. The #set assigns the result to $f, which is then rendered as $r The #set handler validates $f as the assignment target (which passes — f is not blocked), but never inspects the right-hand expression for prototype chain traversal.

PoC

const velocity = require('velocityjs');

const template = "#set($f=$x.constructor.constructor("return process.mainModule.require('child_process').execSync('whoami').toString()"))#set($r=$f())$r";

console.log(velocity.render(template, { x: {} })); // Output: <current OS username> Verified on velocityjs v2.1.6, Node.js v24.15.0, Windows.

Impact

Type: Remote Code Execution (RCE)

Any application that renders attacker-controlled Velocity templates using velocityjs is vulnerable to full server compromise. The attacker can execute arbitrary shell commands, read environment variables, access cloud credentials, and pivot to internal network resources. The existing advisory GHSA-j658-c2gf-x6pq established the threat model: "any app rendering attacker-controlled templates." This finding demonstrates that the fix was incomplete — the #set blocking was added but property read expressions remain unfiltered, making the issue strictly worse (RCE vs prototype pollution).

Patches

Fixed in velocityjs 2.1.7. The fix was merged in pull request #192 and released as v2.1.7. Users should upgrade to version 2.1.7 or later.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmvelocityjsall versions2.1.7npm install velocityjs@2.1.7

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for velocityjs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update velocityjs to 2.1.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-73649 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

### Summary Remote Code Execution (RCE) in velocityjs v2.1.6 via property-read to the Function constructor. This bypasses the fix for GHSA-j658-c2gf-x6pq ("Prototype Pollution in #set path assignment") — that advisory blocked constructor/__proto__/prototype only in the #set assignment handler (set.cjs), but property read expressions are unfiltered. Any application rendering attacker-controlled Velocity templates is vulnerable to arbitrary code execution on the server. ### Details GHSA-j658-c2gf-x6pq added isBlockedPathKey() to dist/cjs/compile/set.cjs:35-43, which blocks __proto__, construc
O3 Security · Impact-Aware SCA

Is CVE-2026-73649 in your dependencies?

Find it across npm, including transitive dependencies.