Critical flaw in Protobuf library enables JavaScript code execution

Published: (April 18, 2026 at 11:09 AM EDT)
2 min read

Source: Bleeping Computer

protobuf image

Overview

Proof‑of‑concept exploit code has been published for a critical remote code execution (RCE) flaw in protobuf.js, a widely used JavaScript implementation of Google’s Protocol Buffers. The library is highly popular in the npm registry, with an average of nearly 50 million weekly downloads (npmjs.com/package/protobufjs). It is used for inter‑service communication, real‑time applications, and efficient storage of structured data in databases and cloud environments.

Vulnerability Details

Application security company Endor Labs reported that the RCE vulnerability is caused by unsafe dynamic code generation. The library builds JavaScript functions from protobuf schemas by concatenating strings and executing them via the Function() constructor, but it fails to validate schema‑derived identifiers (e.g., message names). An attacker can supply a malicious schema that injects arbitrary code into the generated function, which is then executed when the application processes a message using that schema.

The issue is tracked as GHSA‑xq3m‑2v4x‑88gg (no official CVE assigned yet).

Impact

  • Remote code execution on servers or applications that load attacker‑influenced schemas.
  • Potential access to environment variables, credentials, databases, and internal systems.
  • Possibility of lateral movement within the infrastructure.
  • Threat to developer machines that decode untrusted schemas locally.

Affected Versions and Fixes

  • Affected: protobuf.js versions 8.0.0, 7.5.4, and lower.
  • Patched: versions 8.0.1 and 7.5.5.

The patch sanitizes type names by stripping non‑alphanumeric characters, preventing the attacker from closing the synthetic function. Endor Labs notes that a longer‑term fix would be to avoid using Function() for attacker‑reachable identifiers altogether.

Mitigation Recommendations

  • Upgrade to the patched versions (8.0.1 / 7.5.5).
  • Audit transitive dependencies to ensure no vulnerable versions are pulled in.
  • Treat schema loading as untrusted input and prefer pre‑compiled or static schemas in production environments.
  • Monitor for any signs of exploitation, although no active exploitation in the wild has been observed to date.

References

0 views
Back to Blog

Related posts

Read more »

한컴 “올해 단독 매출 2000억 돌파 목표”… AI·일본 사업이 확대

비 오피스 매출 비중 50% 제시, 2026년 매출 2100억·영업익 600억 제시 한글과컴퓨터이하 한컴, 대표 변성준·김연수가 올해 별도기준 매출 목표 2,000억원 돌파를 제시했다. 기존 오피스 소프트웨어 사업의 안정적인 현금창출력을 유지하는 가운데 인공지능AI과 구독형 서비스,...

김승주 교수 “공공 클라우드 보안 검증 개편, 이중규제 여전…거버넌스 손봐야”

국가정보원과 과학기술정보통신부가 공공 클라우드 보안검증 절차를 국정원 단일 체계로 개편하겠다고 발표한 가운데, 기업의 이중 인증 부담을 근본적으로 해소하기 위해서는 이번 제도 개편이 검증 절차의 투명성과 보안 거버넌스 개편 논의가 뒤따라야 한다는 지적이 나왔다. 국가인공지능AI전략위원회...