CVE-2018-3822

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to impersonate legitimate users in X-Pack Security when specific SAML configuration conditions exist. It affects Elastic Stack deployments using X-Pack Security versions 6.2.0-6.2.2 with SAML authentication enabled. Attackers could gain unauthorized access by registering accounts with identifiers that share suffixes with legitimate users.

💻 Affected Systems

Products:
  • Elastic Stack with X-Pack Security
Versions: 6.2.0, 6.2.1, 6.2.2
Operating Systems: All
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when SAML authentication is enabled and the Identity Provider allows self-registration with arbitrary identifiers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover and privilege escalation, allowing attackers to access sensitive data, modify configurations, or disrupt operations as any legitimate user.

🟠

Likely Case

Unauthorized access to user accounts with shared identifier suffixes, potentially leading to data exposure or limited privilege escalation.

🟢

If Mitigated

No impact if SAML self-registration is disabled or if proper identifier validation prevents suffix sharing.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires attacker to register an account and both SAML configuration conditions must be met.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.2.3 or later

Vendor Advisory: https://discuss.elastic.co/t/elastic-stack-6-2-3-security-update/124848

Restart Required: Yes

Instructions:

1. Upgrade to Elastic Stack 6.2.3 or later. 2. Restart all Elastic Stack components. 3. Verify SAML configuration follows security best practices.

🔧 Temporary Workarounds

Disable SAML self-registration

all

Prevent new user registration through SAML Identity Provider

Implement identifier validation

all

Configure SAML Identity Provider to reject identifiers that share suffixes with existing accounts

🧯 If You Can't Patch

  • Disable SAML authentication entirely and use alternative authentication methods
  • Implement strict monitoring for unusual authentication patterns and account creation events

🔍 How to Verify

Check if Vulnerable:

Check X-Pack Security version and verify SAML configuration allows self-registration with arbitrary identifiers.

Check Version:

curl -XGET 'localhost:9200' | grep number

Verify Fix Applied:

Confirm version is 6.2.3 or later and test SAML authentication with suffix-sharing identifiers.

📡 Detection & Monitoring

Log Indicators:

  • Multiple authentication attempts with similar user identifiers
  • Unexpected user account creation via SAML
  • Authentication failures followed by successes with similar usernames

Network Indicators:

  • Unusual SAML authentication request patterns
  • Multiple account registration attempts from single source

SIEM Query:

source="elasticsearch.log" AND ("SAML" AND ("register" OR "new user")) | stats count by src_ip, user

🔗 References

📤 Share & Export