Intel

AIKIDO-2026-202183

pbf is vulnerable to Code Injection

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 15, 2026
July 15, 2026

59

CVE Score

Medium

Code Injection

Are you affected? Scan for Free

TL;DR

The pbf/compile module generates JavaScript reader/writer functions from a parsed protobuf schema and interpolates each field.tag value directly into the generated source that is evaluated with new Function. Field tags were not validated, so a crafted schema supplying a string tag containing JavaScript can inject and execute attacker-controlled code when the schema is compiled. This can lead to arbitrary code execution in the process that compiles an untrusted schema. The fix adds a validateTag check that rejects non-integer tags and tags outside the valid protobuf range before code generation.

How do I fix this?

Upgrade the pbf library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application compiles protobuf schemas from untrusted sources using pbf/compile.

Package

Versions

2.0.0 - 5.1.1

Fixed in 5.1.2

Background info

pbf is vulnerable to Code Injection in versions 2.0.0 - 5.1.1.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea