Skip to content

security: bun installer lacks integrity verification in install.sh #3008

@louisgv

Description

@louisgv

Severity

CRITICAL

Location

sh/cli/install.sh, line 227

Issue

The install script downloads and executes the bun installer without any integrity verification:

curl -fsSL https://bun.sh/install | bash

While HTTPS provides transport security, it doesn't protect against:

  • Compromise of the bun.sh domain
  • Man-in-the-middle attacks if certificate validation is bypassed
  • Supply chain attacks on the bun installer

Recommendation

Add checksum verification before executing the bun installer:

  1. Download the installer to a temp file
  2. Verify the checksum against a known-good value (embedded in the script or fetched from a separate trusted source)
  3. Only execute if the checksum matches

Alternatively, if bun provides signed releases, verify the signature.

Impact

Arbitrary code execution on user machines during spawn installation if the bun installer is compromised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in-progressIssue is being actively worked onsecuritySecurity vulnerabilities and concerns

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions