/

CVE-2026-59151

Severity:

CRITICAL RISK

(9.6)

SAML Auth Bypass (CWE-287) Enables Prowler Tenant Hijack

CVE-2026-59151

Analyzed

Vulnerability type

Category:

Authentication Bypass via SAML Misconfiguration

CWE:

CWE-287

Impact:

Cross-tenant account takeover and unauthorized access

Severity:

CRITICAL RISK

(9.6)

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

Prowler's SAML authentication flow relied on the email domain asserted in the SAML response to decide which tenant should receive the final token, instead of strictly binding token issuance to the validated SAML configuration.

An authenticated attacker controlling a SAML IdP could assert a victim-domain email while completing a valid SAML flow for their own domain, leading to SAML and JWT tokens being issued for the wrong tenant and enabling cross-tenant account takeover.

Affected context

This vulnerability arises in deployments of Prowler that:

  • Use SAML-based single sign-on for tenant selection and authentication
  • Derive tenant identity from user email domains asserted in SAML responses
  • Recalculate tenant during ACS (Assertion Consumer Service) completion logic based on user.email instead of a fixed, validated SAML configuration

It typically manifests where multiple tenants share a Prowler instance, and email domain mappings are treated as the primary discriminator for tenant assignment rather than explicit SAML metadata bindings.

Exploit preconditions

  • Attack surface: SAML-based login endpoint and ACS flow in Prowler.
  • Required access: Ability to authenticate via a controlled SAML Identity Provider (IdP) configured in the system.
  • Trigger point: Completion of the SAML authentication flow where the ACS logic issues a SAMLToken and tenant-scoped JWT based on user.email.
  • Why exploitation is possible: The ACS finish logic trusts the email domain from the SAML assertion and recomputes tenant choice from that value, instead of strictly binding tenant selection to the validated SAML configuration tied to the IdP. This allows an attacker to assert an email from another tenant's domain while using their own IdP, causing tokens to be issued for the wrong tenant.

Why this happens

The underlying issue is an authentication and authorization design flaw consistent with CWE-287: Improper Authentication.

Prowler's SAML integration implicitly treated the email domain in the SAMLResponse as an authoritative signal for tenant identity and then recomputed tenant assignment at the ACS phase using user.email.

This pattern breaks the association between the SAML configuration (the trusted IdP and its mapped tenant) and the token issuance step, allowing a malicious but validly configured IdP to impersonate accounts in another tenant by asserting cross-tenant email addresses.

Abstractly, the bug is a failure to bind authenticated sessions and tokens to a stable, verified identity context, instead relying on mutable attributes that can be forged within a legitimate SAML assertion.

Potential impact

  • Attacker-controlled accounts may gain access to another tenant's Prowler environment.
  • Malicious users could view or modify cloud security findings and configurations for victim tenants.
  • Cross-tenant data exposure could occur, including compliance reports and security posture details.
  • Attackers may manipulate security controls or assessments for victim organizations, undermining trust in the platform.
  • Elevated risk of lateral movement if Prowler integrations trigger actions in underlying cloud environments.

General mitigation guidance

Effective mitigation focuses on making tenant binding and authentication flows strict and context-aware, rather than relying on derived attributes like email domains.

Recommended design patterns include:

  • Binding tenant identity directly to the trusted SAML configuration and IdP metadata, not to asserted email domains or other mutable attributes.
  • Treating SAML attributes as claims that must be validated against a pre-defined mapping and consistency rules before token issuance.
  • Ensuring that token generation (SAML tokens, JWTs) is tied to an immutable, validated tenant context established at the beginning of the SSO handshake.
  • Implementing explicit checks that the asserted email and domain align with the expected tenant for the configured IdP, failing closed on mismatches.
  • Applying least-privilege defaults for any newly created or mapped accounts, and requiring explicit administrative approval for cross-tenant mappings.

These patterns reduce the risk of cross-tenant impersonation even when an attacker controls an IdP or SAML assertions.

How teams detect issues like this

Detecting this class of vulnerability usually involves a mix of code-level and behavioral analysis:

  • Static analysis and code review: Look for logic that derives tenant or account identity from email domains or other SAML attributes without tying them to the SAML configuration object. Flag any recalculation of tenant or identity during ACS completion that is not based on previously validated context.
  • Authentication flow audits: Review SAML integration code to ensure the IdP-to-tenant mapping is enforced consistently from the start of the SSO flow to token issuance, with no intermediate steps that can override the mapping.
  • Logging and anomaly detection: Instrument detailed logs on SAML login events, including IdP identifiers, asserted email addresses, and chosen tenants. Monitor for events where the IdP and tenant mapping appear inconsistent (e.g., an IdP typically associated with one domain producing tokens for another).
  • Policy enforcement: Enforce development policies that forbid using email domains as primary tenant discriminators in multi-tenant systems and require explicit security review for SAML mapping logic.

Automated application security testing tools and SSO-specific linters can complement manual review by flagging risky attribute-based routing patterns.

Sources

SourceLink
github.comgithub.com/prowler-cloud/prowler/commit/bf3b5c2ba713e533014927141b64948c82c8f32e
github.comgithub.com/prowler-cloud/prowler/commit/f5ff30ad175bd2edf02cd28872653c1cda5867b7
github.comgithub.com/prowler-cloud/prowler/pull/11650
github.comgithub.com/prowler-cloud/prowler/releases/tag/5.30.3
github.comgithub.com/prowler-cloud/prowler/security/advisories/GHSA-h8m9-jgf8-vwvp

Frequently asked

questions

Exploitation is scoped to scenarios where an attacker can authenticate through a SAML IdP configured in the affected Prowler deployment. Within that scope, the flaw can enable cross-tenant account takeover if email domains are shared or mis-mapped, but it does not grant unauthenticated, arbitrary access from the public internet.

The attacker must have control over a SAML IdP that Prowler trusts and be able to successfully complete a valid SAML authentication flow. With that capability, they can craft SAML assertions that present email addresses from other tenants' domains and take advantage of the misbinding.

The most robust fix is to bind tenant selection and token issuance strictly to the validated SAML configuration and IdP metadata, rather than to email domains or other mutable attributes. The ACS logic should use the established tenant context from the trusted configuration, rejecting assertions that do not align with that mapping.

Future prevention hinges on designing SSO integrations with strong contextual binding:

  • Define clear IdP-to-tenant mappings and enforce them consistently throughout the authentication flow.
  • Avoid using user attributes (like email domain) as the primary source of truth for tenant or account identity in multi-tenant systems.
  • Incorporate security-focused code reviews for authentication and SAML logic.
  • Use automated checks to flag attribute-based routing or identity decisions that are not anchored to validated configuration objects.
Find out what's already
exploitable in your codebase.