Skip to content

Prototype pollution in convict via load(), loadFile(), and schema initialization

High
toufali published GHSA-hf2r-9gf9-rwch Mar 24, 2026

Package

npm convict (npm)

Affected versions

<= 6.2.4

Patched versions

6.2.5

Description

Impact

Two unguarded prototype pollution paths exist, not covered by previous fixes:

  1. config.load() / config.loadFile()overlay() recursively merges config data without checking for forbidden keys. Input containing __proto__ or constructor.prototype (e.g. from a JSON file) causes the recursion to reach Object.prototype and write attacker-controlled values onto it.
  2. Schema initialization — passing a schema with constructor.prototype.* keys to convict({...}) causes default-value propagation to write directly to Object.prototype at startup.

Depending on how polluted properties are consumed, impact ranges from unexpected behavior to authentication bypass or RCE.

Patches

Fix in progress. No patched version available yet.

Workarounds

Do not pass untrusted data to load(), loadFile(), or convict().

References

Prior advisory: GHSA-44fc-8fm5-q62h
Related issue: #423

Severity

High

CVE ID

CVE-2026-33863

Weaknesses

Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. Learn more on MITRE.

Credits