The vulnerability, identified as CVE-2026-44293, is a code injection issue within the protobuf.js library. It specifically affects the toObject conversion process. When a protobuf message is converted to a JavaScript object, the library handles default values for fields. For bytes fields, the default value was insecurely embedded into the generated JavaScript code.
The root cause is in the converter.toObject function located in src/converter.js. The function was using an unsafe method to construct the JavaScript code for default values of bytes fields. It was concatenating the default value as a string directly into the generated code. An attacker could craft a protobuf schema with a malicious string as the default value for a bytes field. When toObject is called with defaults enabled, this malicious string would be executed as code.
The patch addresses this by changing how the default value is written into the generated code. Instead of direct string concatenation, it now uses a method that treats the default value as data (a JSON literal), effectively neutralizing the code injection vector. The analysis of the commit 69b6aed1b46d4f7d069cbea7d3aecbf4831f295d clearly shows this change in src/converter.js within the converter.toObject function.