The vulnerability, CVE-2026-44294, is a Denial of Service issue in protobuf.js caused by improper input validation of field names from protobuf schemas. When protobuf.js generates Javascript code for operations like encode, decode, or verify, it uses names from the schema to create identifiers (function names and properties) in the generated code. The vulnerability lies in the fact that these names were not properly sanitized.
My analysis of the provided patch 69b6aed1b46d4f7d069cbea7d3aecbf4831f295d reveals that the fix was concentrated in the code generation and utility functions responsible for handling these names. An attacker could provide a specially crafted schema with control characters in field or message names. This would cause the code generation process to produce syntactically invalid Javascript. When the application attempts to use the affected message type for the first time (e.g., by calling decode), the invalid code would be evaluated, throwing a SyntaxError and crashing the process, leading to a Denial of Service.
The three functions identified are central to the vulnerability and its fix:
codegen: This is the core function for generating dynamic methods. It was vulnerable to crafted message names used as function names. The patch adds the safeFunctionName helper to sanitize these names.
util.safeProp: This utility is used to generate property accessors from field names. The original escaping was insufficient. The fix replaces it with the more robust JSON.stringify.
escapeName: This function serves the same purpose as the others but for the static code generation part of the CLI. It was also hardened to strip malicious characters.
By identifying these functions, a security engineer can understand that any runtime profile showing calls into protobuf.js's code generation logic (which happens lazily on the first use of a message type) could be an indicator of an attempt to exploit this vulnerability if the application loads untrusted schemas.