CVE-2023-0163

8.4 HIGH

📋 TL;DR

This CVE describes a Prototype Pollution vulnerability in Mozilla Convict, a Node.js configuration management library. Attackers can inject or override object attributes, potentially causing crashes or enabling further attacks. Systems using Convict versions before 6.2.4 for server-side configuration management are affected.

💻 Affected Systems

Products:
  • Mozilla Convict
Versions: All versions before 6.2.4
Operating Systems: All operating systems running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where Convict is used to parse untrusted or externally influenced configuration files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution or complete server compromise through prototype pollution leading to arbitrary code execution.

🟠

Likely Case

Server crashes or denial of service due to incompatible type overrides, potentially disrupting application functionality.

🟢

If Mitigated

Limited to configuration corruption if input validation prevents malicious payloads, but still risks stability issues.

🌐 Internet-Facing: MEDIUM - Requires admin-level access to configuration files, but could be exploited through social engineering or compromised admin accounts.
🏢 Internal Only: MEDIUM - Internal admins could inadvertently introduce malicious configurations, but requires privileged access to config files.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to modify configuration files, typically requiring admin access or social engineering of administrators.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.2.4

Vendor Advisory: https://github.com/mozilla/node-convict/security/advisories/GHSA-4jrm-c32x-w4jf

Restart Required: Yes

Instructions:

1. Update package.json to specify 'convict': '>=6.2.4'. 2. Run 'npm update convict' or 'yarn upgrade convict'. 3. Restart all Node.js applications using Convict.

🔧 Temporary Workarounds

Input Validation

all

Implement strict validation of configuration file inputs to prevent malicious payloads.

Implement schema validation for all configuration inputs
Use JSON schema validation before Convict parsing

Configuration File Permissions

linux

Restrict write access to configuration files to trusted administrators only.

chmod 600 config/*.json
setfacl -m u:trustedadmin:rw config/*.json

🧯 If You Can't Patch

  • Implement strict access controls on configuration files to prevent unauthorized modifications.
  • Use alternative configuration management libraries that are not vulnerable to prototype pollution.

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for convict version. If version is below 6.2.4, system is vulnerable.

Check Version:

npm list convict | grep convict

Verify Fix Applied:

Verify convict version is 6.2.4 or higher using 'npm list convict' or checking package.json.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected server crashes or restarts
  • Configuration parsing errors with unusual property names
  • Prototype modification warnings in Node.js logs

Network Indicators:

  • Unusual configuration file uploads or modifications
  • Admin interface access from unexpected locations

SIEM Query:

source="application.logs" AND ("convict" OR "config") AND ("crash" OR "error" OR "prototype")

🔗 References

📤 Share & Export