Skip to main content

Pac4J CVE-2026-40459

| EUVDEUVD-2026-23423 HIGH
LDAP Injection (CWE-90)
2026-04-17 CERT-PL
8.7
CVSS 4.0 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain low-privilege credentials
  2. Delivery
    Authenticate to PAC4J-integrated application
  3. Exploit
    Inject LDAP metacharacters into ID search parameter
  4. Install
    Trigger vulnerable LDAP query method
  5. C2
    Execute arbitrary LDAP filter operations
  6. Execute
    Extract sensitive directory data or modify attributes
  7. Impact
    Escalate privileges or pivot to directory infrastructure

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization LDAP query parameterization
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires valid low-privileged credentials (PR:L) to an application using PAC4J's LDAP authentication module. Specifically requires the application to expose PAC4J LDAP ID-based search functionality to authenticated users, such as user profile lookups, group membership queries, or directory search features. Default PAC4J installations using LDAP authentication are vulnerable if running affected versions. Exploitation is LIMITED by authentication requirement (not remotely exploitable by unauthenticated attackers) and by application architecture (applications not using LDAP module or not exposing ID search parameters are unaffected). Network accessibility (AV:N) and low attack complexity (AC:L) mean exploitation is straightforward once authentication barrier is cleared, with no user interaction (UI:N) or special configuration needed beyond standard PAC4J LDAP integration.

Impact

Real-world risk is MODERATE despite High CVSS 8.7. Converging signals: CVSS vector (AV:N/AC:L/PR:L) indicates network-accessible attack with low complexity but requires authenticated access (low-privileged account). SSVC framework marks exploitation as 'none' and automatable as 'no', aligning with EPSS 0.22% (45th percentile) - below median exploitation probability. No CISA KEV listing confirms no observed active exploitation. The PR:L requirement significantly reduces attack surface versus unauthenticated vulnerabilities, as attacker needs valid LDAP-enabled credentials first. However, SSVC 'Technical Impact: total' and CVSS VC:H/VI:H/VA:H indicate complete confidentiality/integrity/availability compromise of LDAP directory if exploited. Primary risk scenario: insider threat or compromised low-privilege accounts in environments using PAC4J LDAP authentication against critical directory services (Active Directory, OpenLDAP). Organizations not using PAC4J's LDAP module are unaffected. Priority: High for LDAP-integrated deployments with PAC4J versions in affected ranges; Medium-Low for environments where attackers lack low-privilege credentials.

Exploit ScenarioDerived

Attacker obtains low-privilege credentials to an application using PAC4J LDAP authentication (e.g., via phishing, credential stuffing, or insider access). Attacker crafts malicious input for ID-based search parameters, injecting LDAP filter syntax such as '*)(uid=*))(|(uid=*' to manipulate query logic. The vulnerable PAC4J method constructs an LDAP query without proper sanitization, executing attacker-controlled filters against the backend directory. Attacker enumerates sensitive LDAP entries (user accounts, groups, organizational structure), modifies directory attributes to escalate privileges, or extracts password hashes for offline cracking. In Active Directory environments, could lead to domain reconnaissance and privilege escalation paths.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Apr 20, 2026

LDAP injection vulnerabilities in PAC4J authentication library allow low-privileged remote attackers to execute arbitrary LDAP queries and directory operations by injecting malicious syntax into ID-based search parameters. Affects PAC4J 4.x before 4.5.10, 5.x before 5.7.10, and 6.x before 6.4.1. CVSS 8.7 (High) with network vector, low complexity, and low privilege requirement. No active exploitation confirmed per CISA KEV; EPSS score 0.22% suggests low near-term exploitation probability. Vendor patches available per pac4j.org advisory. CERT-PL reported vulnerability.

Earlier versions of this analysis (1)
v1 Apr 17, 2026 - 16:08 CVSS 8.7

LDAP injection in PAC4J authentication library allows authenticated remote attackers to manipulate directory queries and execute unauthorized LDAP operations across versions 4.0-6.4.0. Low attack complexity and network accessibility elevate risk despite low-privilege requirement. CERT-PL identified the flaw, which vendor patched in versions 4.5.10, 5.7.10, and 6.4.1. EPSS data not available, but SSVC framework rates technical impact as 'total' with exploitation status 'none' and non-automatable attack chain, suggesting targeted exploitation scenario. No public exploit identified at time of analysis.

RemediationAI

Upgrade PAC4J to patched versions: 4.5.10 (for 4.x branch), 5.7.10 (for 5.x branch), or 6.4.1 (for 6.x branch) per vendor advisory at https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html. Patches implement proper input validation and LDAP query parameterization to prevent injection attacks. If immediate patching is infeasible, implement compensating controls: (1) Disable LDAP authentication module in PAC4J configuration and use alternative authentication mechanisms (OAuth, SAML, database) until upgrade completes - eliminates attack surface but requires application reconfiguration and user migration; (2) Deploy strict input validation at application layer before passing parameters to PAC4J LDAP methods, specifically sanitizing LDAP special characters: parentheses, asterisks, backslashes, null bytes, pipe symbols - requires code changes and thorough testing to avoid breaking legitimate usernames; (3) Restrict network access to LDAP directories using firewall rules limiting queries to authorized application servers only - reduces blast radius but does not prevent exploitation by authenticated users. Note: Workarounds provide partial risk reduction; vendor patch is the complete fix.

Affected VersionsENISA

pac4j 5.0 <5.7.10
pac4j 4.0 <4.5.10
pac4j 6.0 <6.4.1

Affected Packages

euvd pac4j fix: 4.5.10, 5.7.10, 6.4.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PAC4J is a Java security framework providing authentication and authorization across multiple protocols (OAuth, SAML, CAS, LDAP, etc.). This vulnerability (CWE-90: LDAP Injection) affects the LDAP authentication module where user-supplied input in ID-based search parameters is insufficiently sanitized before constructing LDAP queries. LDAP injection allows attackers to manipulate query logic by inserting metacharacters like parentheses, asterisks, and boolean operators (e.g., transforming '(uid=USERNAME)' into '(uid=*)(|(uid=*))' to bypass filters or enumerate entries). The affected CPE (cpe:2.3:a:pac4j:pac4j) covers all PAC4J core distributions. Multiple methods are vulnerable, suggesting widespread improper input validation across LDAP query construction points in the codebase.

Know when Pac4J gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Analysis Updated
Apr 20, 2026 - 14:57 vuln.today
v2 - CVSS changed
Patch released
Apr 20, 2026 - 14:38 nvd
Patch available
Patch available
Apr 17, 2026 - 14:01 EUVD
CVE Published
Apr 17, 2026 - 13:18 nvd
HIGH 8.7

DescriptionCVE.org

PAC4J is vulnerable to LDAP Injection in multiple methods. A low-privileged remote attacker can inject crafted LDAP syntax into ID-based search parameters, potentially resulting in unauthorized LDAP queries and arbitrary directory operations.

This issue was fixed in PAC4J versions 4.5.10, 5.7.10 and 6.4.1

Executive ViewAI

Why It Matters

PAC4J authentication library versions 4.x, 5.x, and 6.x contain LDAP injection vulnerabilities that allow low-privileged attackers to execute arbitrary directory queries, potentially enabling unauthorized access to sensitive directory data or account information. Organizations using PAC4J for authentication should prioritize patching to prevent attackers from bypassing access controls or extracting sensitive directory attributes through crafted requests.

Business Impact: High
Compensating Controls

Apply vendor patch. Interim mitigations pending patch deployment: implement strict input validation on all LDAP search parameters, restrict LDAP directory account privileges to read-only access, isolate LDAP services on separate network segments, and monitor LDAP query logs for injection attempts (e.g., wildcard or special character sequences in search fields).

Threat Intelligence Overview

EPSS Score
0.2%
Top 55% exploitable
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy