Skip to content

LDAP query injection in Pinniped Supervisor before v0.17.0 causes attacker to escalate privileges by changing Kubernetes group memberships when the attacker is also able to edit their own LDAP user entry

High
cfryanr published GHSA-hvrf-5hhv-4348 May 6, 2022

Package

gomod go.pinniped.dev (Go)

Affected versions

>= v0.9.0, <v0.17.0

Patched versions

v0.17.0

Description

Impact

A user authenticating to Kubernetes clusters via the Pinniped Supervisor could potentially gain elevated permissions in the clusters, only if all of the following conditions were true:

  • The Pinniped Supervisor is configured with either an LADPIdentityProvider or an ActiveDirectoryIdentityProvider resource
  • The user somehow had the ability to edit some part of the distinguished name (DN) of user entries in the LDAP or Active Directory (AD) server's database
  • The user knows the password for the edited LDAP user entry (i.e. the user is a legitimate user)

An attack would involve the attacker changing the common name (CN) of their user entry on the LDAP or AD server to include special characters, which could be used to perform LDAP query injection on the Supervisor's LDAP query which determines their Kubernetes group membership.

Generally, users cannot edit LDAP entries, in which case this attack would first require compromising the LDAP server's security.

If you use the Pinniped Supervisor with either an LADPIdentityProvider or an ActiveDirectoryIdentityProvider resource, and your end users are able to change any part of their DN in their LDAP entry on the LDAP or AD server, then you should immediately upgrade Pinniped to v0.17.0.

Patches

The Pinniped Supervisor's LADPIdentityProvider feature was first introduced in v0.9.0. Previous versions were not effected.

The fix was introduced in release v0.17.0.

Workarounds

Preventing attackers from being able to edit their LDAP user entry prevents them from controlling the inputs required to make this attack.

References

The issue was fixed by PR #1148.

For more information

If you have any questions or comments about this advisory, please reach out to the maintainers using one of the methods described in this repo's README.md.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2022-22975

Weaknesses