Skip to content

Missing deployment-read authorization allows restricted users to retrieve deployed worker source code

Moderate
carderne published GHSA-mwg9-7v56-c49h Nov 18, 2026

Package

No package listed

Affected versions

<= 4.7.3

Patched versions

>=4.7.4

Description

Summary

The background-worker source endpoint authenticates callers and checks project membership, but does not enforce the caller's deployment-read permission before returning worker source code and task configuration.

An organization member using a personal access token with a custom role that denies deployment reads may therefore retrieve deployed worker source through this endpoint.

Root cause

apps/webapp/app/routes/api.v1.projects.$projectRef.background-workers.$envSlug.$version.ts calls authenticateRequest and authenticatedEnvironmentForAuthentication, then loads the worker and returns decompressed file contents and task configuration. It does not call authorizePatEnvironmentAccess.

The sibling route api.v1.projects.$projectRef.$env.workers.$tagName.ts enforces this permission using authorizePatEnvironmentAccess with resource deployments, action read, and the resolved organization, project, and environment type.

Project membership and environment resolution do not replace this permission check.

Impact and prerequisites

A successful attack discloses deployed worker source code and task configuration. No modification of source or deployment state has been established.

The attacker needs:

  • Membership in the target project.
  • A personal access token associated with a custom role that denies deployment reads for the target environment.
  • The project reference, environment identifier, and worker version.

Built-in roles that already permit deployment reads are not affected by this permission bypass. Default self-hosted installations use permissive RBAC and do not enforce the restricted-role boundary described here.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

CVE ID

No known CVE

Weaknesses

Missing Authorization

The product does not perform an authorization check when an actor attempts to access a resource or perform an action. Learn more on MITRE.

Incorrect Authorization

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. Learn more on MITRE.