Skip to content
nulltapE-reader edition

← All e-reader articles

3 min read

Promzard Context Keys Let Untrusted Input Execute Node.js Code

Promzard 4.0.0 and earlier turn context property names into evaluated JavaScript. Trace who controls those names and allow only expected keys.

Read on the standard site

An amber key-shaped field crosses a bracket on an abstract configuration screen.

Promzard versions 4.0.0 and earlier let a context object’s property names become JavaScript source during template evaluation. If an attacker can name those properties through a configuration file, request or environment data, the injected code runs with the Node.js process’s privileges. CERT/CC disclosed the flaw on November 12 as CVE-2026-127109. That puts applications and setup tools at risk when they take externally supplied field names into Promzard’s ctx.

The key name is the input that becomes JavaScript source. The CVE record puts the surprising case plainly: code can run “even when the template file is fully trusted.” A reviewed template alone therefore leaves the relevant input path open.

Context keys enter evaluated code

Promzard uses ctx to expose values to a template module as it builds prompted configuration. CERT/CC describes a function-expression source string assembled with the context keys in its parameter list; the library evaluates that string with vm.runInThisContext(). A hostile key can escape the parameter list and supply JavaScript that executes in the same Node.js process. The CVE record classifies this parameter-list injection as CWE-94.

The trust decision sits upstream of the library call. A fixed list of application-owned context names keeps the attacker away from that source-code slot; copying property names straight from parsed input gives them a path into it. CERT/CC credits Abdullah Hamdan with reporting the vulnerability.

Trace each context key producer

Start with deployed copies of promzard: inspect the dependency tree and lockfiles for 4.0.0 or earlier, including tools used to generate configuration during setup. Then find the calls that create or pass ctx. For each call, follow property names backward through request parsers, configuration loaders and environment-derived maps.

Pay particular attention to a generic object spread, a map from user-supplied field names or a configuration loader that preserves arbitrary keys. If an untrusted source could choose a key, identify the Node.js process that consumed it and inspect that process’s available execution and input history for the relevant period. CERT/CC provides no malicious-key signature, so follow the key’s path into ctx before relying on an alert search.

Restrict names before Promzard runs

Build ctx from explicitly expected property names at the caller. Reject unknown names at the request or configuration boundary, and keep attacker-provided maps out of the parameter-building path. CERT/CC recommends strict validation and excluding arbitrary untrusted keys; this keeps untrusted names out of the generated parameter list.

To verify the restriction, exercise the normal configuration flow with an unexpected, inert field name and verify that the caller rejects it before it reaches ctx; repeat for each external input route you found. Confirm both the installed dependency version and caller behavior in each deployed flow. npm’s captured latest metadata identifies 4.0.0, an affected release, and CERT/CC says it could not reach the maintainers for coordination. Keep the key restriction in place while assessing any later release against an authoritative fix notice.

Primary sources