builder icon indicating copy to clipboard operation
builder copied to clipboard

[SECURITY] Supply chain compromise in @builder.io/[email protected] — C2 redirect via Cloudflare tunnel

Open askasmani opened this issue 5 months ago • 5 comments

Summary

The npm package @builder.io/[email protected], published on June 8 2026 by the maintainer account liamdebeasi, contains a surgically injected C2 redirect that routes all CLI API calls through an attacker-controlled Cloudflare Quick Tunnel.

Affected Version

  • Package: @builder.io/dev-tools
  • Version: 1.64.2-dev.202606082025.8ce823363
  • Published by: liamdebeasi (personal npm token — no OIDC provenance)
  • Tarball: https://registry.npmjs.org/@builder.io/dev-tools/-/dev-tools-1.64.2-dev.202606082025.8ce823363.tgz

The stable release 1.64.2 (published via GitHub Actions OIDC) is not affected.

Technical Details

The Injection

In cli/index.cjs (line 29862), the legitimate API host initialization:

apiAirV2Host = process.env.AIR_HOST || process.env.BUILDER_HOST || "https://api.builder.io";

was replaced with a hardcoded attacker-controlled Cloudflare Quick Tunnel:

apiAirV2Host = "https://resume-payday-authors-donna.trycloudflare.com";

The environment variable fallback was completely removed, forcing all API traffic through the attacker's infrastructure regardless of configuration.

The same change is reflected in:

  • cli/index.cjs (runtime bundle)
  • cli/index.cjs.map (source map)
  • types/cli/constants.d.ts (type declaration)

Scope

The apiAirV2Host variable is referenced ~50 times in the CLI bundle, routing the following API calls through the C2:

Category Endpoints
Credentials fusion/cli-key, users/
Project data projects, projects/branches, projects/git-configs
Git backups projects/git-backup-upload-url, projects/git-backup-record
Codegen/AI codegen/completion, codegen/sessions/, codegen/replay/
Design systems design-systems/v1/decode-jobs/, design-systems/v1/mcp
Mappings mappings/publish

All requests transmit Authorization: Bearer headers (private API keys) and apiKey query parameters (public keys), along with user IDs, device IDs, project data, and git backup content.

Other Versions by Same Account

Two other dev versions published by liamdebeasi on the same day were independently verified as clean:

  • 1.64.2-dev.202606081952.82e0e57bb — clean
  • 1.64.2-dev.202606081921.b0dd50edf — clean

Only the 202606082025 version contains the injection.

Indicators of Compromise

  • The compromised version is unminified (8.5 MB vs 4.8 MB for stable), suggesting a modified local build rather than standard CI
  • Published with a personal npm token, not via GitHub Actions OIDC (which the stable releases use)
  • The Cloudflare Quick Tunnel domain resume-payday-authors-donna.trycloudflare.com is ephemeral and attacker-controlled

Recommended Actions

  1. Yank version 1.64.2-dev.202606082025.8ce823363 from npm immediately
  2. Revoke the npm access token for liamdebeasi and investigate whether the account was compromised
  3. Audit all other recent publishes from the same account
  4. Notify any users who may have installed this version to rotate their Builder.io API keys
  5. Consider requiring OIDC-only publishing for all versions (including dev/prerelease) to prevent personal token compromise from leading to malicious publishes

Verification

Anyone can independently verify by downloading and inspecting the tarball:

curl -O https://registry.npmjs.org/@builder.io/dev-tools/-/dev-tools-1.64.2-dev.202606082025.8ce823363.tgz
tar xzf dev-tools-1.64.2-dev.202606082025.8ce823363.tgz
grep "resume-payday" package/cli/index.cjs
# Returns: apiAirV2Host = "https://resume-payday-authors-donna.trycloudflare.com";

askasmani avatar Jun 10 '26 08:06 askasmani

@askasmani is there a possibility of mistaken publishing of dev setup backend URL, i.e that clodflare may be builder's dev api backend?

looks like they removed this version.

KunalSin9h avatar Jun 10 '26 08:06 KunalSin9h

The version was removed but the url: resume-payday-authors-donna.trycloudflare.com looks dodgy and it needs at least to be checked with the developer whether this was intentional or something else.

askasmani avatar Jun 10 '26 12:06 askasmani

Hi everyone!

Thanks for bringing this to our attention. I can confirm that @builder.io/dev-tools was not compromised. The trycloudflare.com proxy URL went to Builder-owned infrastructure and was deployed to a non-prod version of @builder.io/dev-tools that is only used internally by Builder employees for testing purposes. Additionally, that proxy URL is no longer live. We also have new testing methods that no longer require this approach.

I am going to close this, but please reach out if you have any further questions.

liamdebeasi avatar Jun 10 '26 15:06 liamdebeasi

The same thing happened again in this version: @builder.io/dev-[email protected]

another dodgy url.

@liamdebeasi are u guys still using the same approach flagged earlier ?

askasmani avatar Jul 30 '26 06:07 askasmani

@askasmani Can you point me to where in that package you are seeing the suspicious URL?

liamdebeasi avatar Jul 30 '26 14:07 liamdebeasi