/

CVE-2026-111684

Severity:

HIGH RISK

(8.3)

Authorization Bypass (CWE-639) in Magistrala Certs

CVE-2026-111684

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-639

Impact:

Cross-Tenant Certificate Access and Control

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Magistrala contains an authorization bypass that lets an authenticated workspace member access certificate operations belonging to other tenants. By supplying foreign device serials or entity identifiers, an attacker may view, revoke, or issue CA-signed certificates for devices outside their authorized workspace.

Magistrala contains an authorization bypass that lets an authenticated workspace member access certificate operations belonging to other tenants. By supplying foreign device serials or entity identifiers, an attacker may view, revoke, or issue CA-signed certificates for devices outside their authorized workspace.

Affected context

The vulnerability occurs in Magistrala certificate-management operations when authorization is tied to the caller's workspace path but the requested device serial or entity identifier is not independently checked against that workspace. Affected operations include certificate viewing, listing, issuance, and revocation, particularly where tenant ownership is represented by user-controlled request identifiers.

The vulnerability occurs in Magistrala certificate-management operations when authorization is tied to the caller's workspace path but the requested device serial or entity identifier is not independently checked against that workspace. Affected operations include certificate viewing, listing, issuance, and revocation, particularly where tenant ownership is represented by user-controlled request identifiers.

Exploit preconditions

  • Attack surface: Authenticated certificate-management API endpoints
  • Required access: Membership in at least one Magistrala workspace
  • Trigger point: Certificate operations such as viewing, listing, issuing, or revoking certificates
  • Required condition: The request can supply a device serial or entity identifier associated with another tenant
  • Why exploitation is possible: Server-side authorization does not consistently verify that the referenced device or certificate belongs to the caller's workspace
  • Attack surface: Authenticated certificate-management API endpoints
  • Required access: Membership in at least one Magistrala workspace
  • Trigger point: Certificate operations such as viewing, listing, issuing, or revoking certificates
  • Required condition: The request can supply a device serial or entity identifier associated with another tenant
  • Why exploitation is possible: Server-side authorization does not consistently verify that the referenced device or certificate belongs to the caller's workspace

Why this happens

The underlying flaw is an object-level authorization failure mapped to CWE-639: Authorization Bypass Through User-Controlled Key. The application appears to authorize the workspace context but then trusts caller-supplied serials or entity identifiers when selecting certificate-related resources. Without an explicit ownership or tenant-scope check for each referenced object, an authenticated user can perform privileged operations across tenant boundaries.

The underlying flaw is an object-level authorization failure mapped to CWE-639: Authorization Bypass Through User-Controlled Key. The application appears to authorize the workspace context but then trusts caller-supplied serials or entity identifiers when selecting certificate-related resources. Without an explicit ownership or tenant-scope check for each referenced object, an authenticated user can perform privileged operations across tenant boundaries.

Potential impact

  • Other tenants' device certificates may be disclosed
  • Devices belonging to other workspaces may be disconnected through certificate revocation
  • Attackers may issue CA-signed certificates for unauthorized device identifiers
  • Cross-tenant device impersonation or unauthorized access may occur
  • Certificate trust relationships and tenant isolation may be weakened
  • Other tenants' device certificates may be disclosed
  • Devices belonging to other workspaces may be disconnected through certificate revocation
  • Attackers may issue CA-signed certificates for unauthorized device identifiers
  • Cross-tenant device impersonation or unauthorized access may occur
  • Certificate trust relationships and tenant isolation may be weakened

General mitigation guidance

Mitigation generally centers on enforcing object-level authorization at every certificate operation and reducing trust in caller-supplied identifiers.

Common defensive patterns include:

  • Deriving tenant and workspace scope from trusted server-side identity context
  • Verifying ownership or authorized delegation for every serial and entity identifier
  • Applying consistent authorization checks to view, list, issue, and revoke operations
  • Using deny-by-default policies for cross-tenant resource access
  • Separating certificate-management privileges from ordinary workspace membership
  • Recording and monitoring certificate issuance, disclosure, and revocation events
  • Limiting certificate authority capabilities and service permissions according to least privilege

Mitigation generally centers on enforcing object-level authorization at every certificate operation and reducing trust in caller-supplied identifiers.

Common defensive patterns include:

  • Deriving tenant and workspace scope from trusted server-side identity context
  • Verifying ownership or authorized delegation for every serial and entity identifier
  • Applying consistent authorization checks to view, list, issue, and revoke operations
  • Using deny-by-default policies for cross-tenant resource access
  • Separating certificate-management privileges from ordinary workspace membership
  • Recording and monitoring certificate issuance, disclosure, and revocation events
  • Limiting certificate authority capabilities and service permissions according to least privilege

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis and code review checks for authorization decisions based only on URL paths or caller-controlled identifiers
  • Tests that attempt cross-tenant access using valid credentials from a different workspace
  • Review of all object-fetching, certificate issuance, and revocation handlers for ownership enforcement
  • Policy checks requiring centralized authorization middleware or service-layer scope validation
  • Audit-log analysis for certificate operations involving resources outside the caller's tenant
  • Automated application security testing that exercises horizontal privilege boundaries

Organizations can identify similar weaknesses through:

  • Static analysis and code review checks for authorization decisions based only on URL paths or caller-controlled identifiers
  • Tests that attempt cross-tenant access using valid credentials from a different workspace
  • Review of all object-fetching, certificate issuance, and revocation handlers for ownership enforcement
  • Policy checks requiring centralized authorization middleware or service-layer scope validation
  • Audit-log analysis for certificate operations involving resources outside the caller's tenant
  • Automated application security testing that exercises horizontal privilege boundaries

Sources

SourceLink
github.comgithub.com/absmach/magistrala
github.comgithub.com/absmach/magistrala/blob/v1.0.0/certs/middleware/authorization.go#L97-L110
github.comgithub.com/absmach/magistrala/blob/v1.0.0/certs/service.go#L136-L180
hackmd.iohackmd.io/@hieuPenguinnn/magistrala-certs-missing-workspace-scope-cross-tenant
vulncheck.comvulncheck.com/advisories/magistrala-through-1.0.0-cross-tenant-authorization-bypass-in-certs-service

Frequently asked

questions

Yes, where the certificate-management APIs are reachable and an attacker has valid credentials for a Magistrala workspace. Exploitation does not require administrative privileges if ordinary workspace membership is sufficient to invoke the affected operations.

The attacker generally needs authenticated membership in their own workspace and the ability to submit certificate requests containing device serials or entity identifiers. The critical missing control is verification that those identifiers belong to the caller's authorized tenant.

Enforce object-level authorization server-side for every certificate resource and operation, using trusted tenant context rather than relying on caller-supplied identifiers or workspace paths alone.

Use deny-by-default authorization, centralized scope checks, cross-tenant negative tests, least-privilege certificate permissions, and monitoring for unusual certificate issuance or revocation activity.

Yes, where the certificate-management APIs are reachable and an attacker has valid credentials for a Magistrala workspace. Exploitation does not require administrative privileges if ordinary workspace membership is sufficient to invoke the affected operations.

The attacker generally needs authenticated membership in their own workspace and the ability to submit certificate requests containing device serials or entity identifiers. The critical missing control is verification that those identifiers belong to the caller's authorized tenant.

Enforce object-level authorization server-side for every certificate resource and operation, using trusted tenant context rather than relying on caller-supplied identifiers or workspace paths alone.

Use deny-by-default authorization, centralized scope checks, cross-tenant negative tests, least-privilege certificate permissions, and monitoring for unusual certificate issuance or revocation activity.

Find out what's already
exploitable in your codebase.