{"id":"CVE-2026-54271","aliases":["CVE-2026-54271","GHSA-pr59-h9ph-3fr8"],"related":[],"kind":"vulnerability","state":"published","title":"protobufjs-cli: Code injection in pbjs static output from crafted JSON descriptor names","summary":"protobufjs-cli is the command line add-on for protobuf.js. Prior to 1.3.2 and 2.5.0, a previous fix for unsafe name handling in pbjs static / static-module code generation was incomplete. Affected versions of protobufjs-cli could still emit unsafe JavaScript references when generating static output from crafted JSON descriptor input. The common case of parsing schemas from .proto files is not affected. This is a bypass of CVE-2026-44295. An attacker who can provide or influence pre-parsed JSON descriptors passed to pbjs static code generation may be able to cause generated JavaScript output to contain attacker-controlled code. The injected code may execute if the generated file is later executed or imported and an affected generated API path is invoked. This vulnerability is fixed in 1.3.2 and 2.5.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"protobufjs-cli is the command line add-on for protobuf.js. Prior to 1.3.2 and 2.5.0, a previous fix for unsafe name handling in pbjs static / static-module code generation was incomplete. Affected versions of protobufjs-cli could still emit unsafe JavaScript references when generating static output from crafted JSON descriptor input. The common case of parsing schemas from .proto files is not affected. This is a bypass of CVE-2026-44295. An attacker who can provide or influence pre-parsed JSON descriptors passed to pbjs static code generation may be able to cause generated JavaScript output to contain attacker-controlled code. The injected code may execute if the generated file is later executed or imported and an affected generated API path is invoked. This vulnerability is fixed in 1.3.2 and 2.5.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA previous fix for unsafe name handling in `pbjs` static / static-module code generation was incomplete. Affected versions of `protobufjs-cli` could still emit unsafe JavaScript references when generating static output from crafted JSON descriptor input. The common case of parsing schemas from `.proto` files is not affected.\n\nThis is a bypass of GHSA-6r35-46g8-jcw9 / CVE-2026-44295.\n\n## Impact\n\nAn attacker who can provide or influence pre-parsed JSON descriptors passed to `pbjs` static code generation may be able to cause generated JavaScript output to contain attacker-controlled code.\n\nThe injected code may execute if the generated file is later executed or imported and an affected generated API path is invoked.\n\n## Preconditions\n\n* The application or build process must run `pbjs` static code generation on a pre-parsed JSON descriptor influenced by an attacker.\n* The generated JavaScript file must subsequently be executed or imported.\n* An affected generated API path must be invoked.\n\n## Workarounds\n\nDo not run affected versions of `pbjs` static or static-module generation on untrusted JSON descriptors. If untrusted JSON descriptors must be accepted, validate descriptor-derived names before code generation and reject names that could not have been produced by parsing a valid `.proto` file. Running code generation in an isolated environment can reduce impact.","format":"markdown","source":"ghsa"},{"lang":"es","text":"protobufjs-cli es el complemento de línea de comandos para protobuf.js. Antes de 1.3.2 y 2.5.0, una corrección anterior para el manejo inseguro de nombres en la generación de código estático / de módulo estático de pbjs estaba incompleta. Las versiones afectadas de protobufjs-cli aún podían emitir referencias JavaScript inseguras al generar salida estática a partir de una entrada de descriptor JSON manipulada. El caso común de análisis de esquemas desde archivos .proto no se ve afectado. Esto es una omisión de CVE-2026-44295. Un atacante que puede proporcionar o influir en descriptores JSON pre-analizados pasados a la generación de código estático de pbjs podría ser capaz de hacer que la salida JavaScript generada contenga código controlado por el atacante. El código inyectado podría ejecutarse si el archivo generado se ejecuta o importa posteriormente y se invoca una ruta de API generada afectada. Esta vulnerabilidad está corregida en 1.3.2 y 2.5.0.","source":"nvd"}],"published":"2026-06-15T20:13:54.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L","score":8.2,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 1.3.2","status":"affected"},{"version":">= 2.0.0, < 2.4.2","status":"affected"}],"vendor":"protobufjs","product":"protobufjs-cli","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.3.2"}],"ecosystem":"npm","package":"protobufjs-cli","purl":"pkg:npm/protobufjs-cli","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.5.0"}],"ecosystem":"npm","package":"protobufjs-cli","purl":"pkg:npm/protobufjs-cli","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.3.2"},{"status":"affected","introduced":"2.0.0","fixed":"2.5.0"}],"vendor":"protobufjs_project","product":"protobufjs-cli","cpe":"cpe:2.3:a:protobufjs_project:protobufjs-cli:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-pr59-h9ph-3fr8","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54271","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/protobufjs/protobuf.js","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-23T13:48:57.561Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54271","url":"https://www.cve.org/CVERecord?id=CVE-2026-54271","licence":"CVE Terms of Use","modified":"2026-06-23T13:49:08.385Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pr59-h9ph-3fr8","url":"https://github.com/advisories/GHSA-pr59-h9ph-3fr8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:50.091Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54271","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54271","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.393Z","epss":{"score":0.0029,"percentile":0.23232,"date":"2026-12-01T12:00:22.000Z"}}