# CVE-2012-5571: Openstack keystone: openstack keystone: authorization bypass via improper ec2 token handling

> Remote authenticated users can bypass authorization restrictions in OpenStack Keystone by exploiting improper EC2 token handling after role removal.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Dec 2012
- **Updated:** 7 Apr 2026
- **Also known as:** DEBIAN-CVE-2012-5571, GHSA-qvpr-qm6w-6rcc

## What is CVE-2012-5571?

CVE-2012-5571 is a medium-severity authentication bypass vulnerability in Red Hat OpenStack Platform 13 (Queens), published on 18 Dec 2012. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A flaw was found in OpenStack Keystone. This vulnerability allows remote authenticated users to bypass intended authorization restrictions. This occurs because OpenStack Keystone does not properly handle EC2 (Elastic Compute Cloud) tokens when a user's role has been removed from a tenant. An attacker can leverage a token associated with a removed user role to gain unauthorized access.

Weakness: CWE-255, CWE-639 (Authorization Bypass Through User-Controlled Key)

## Which versions are affected by CVE-2012-5571?

2 open source packages ship an affected version, including Keystone and keystone. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Keystone` | PyPI | All versions | 8.0.0a0 |
| `keystone` | PyPI | All versions | 8.0.0a0 |

Products: Openstack Essex, Openstack Folsom.

## How do I fix CVE-2012-5571?

Upgrade Keystone to 8.0.0a0 or later.

## Is CVE-2012-5571 being exploited?

There is no known exploitation of CVE-2012-5571 in the wild and no public exploit code.

## Other vulnerabilities in Red Hat OpenStack Platform 13 (Queens)

- [CVE-2013-0261](https://insights.sbomify.com/CVE-2013-0261/): Packstack: packstack: arbitrary file overwrite via symlink attack (high 8.8)
- [CVE-2013-0266](https://insights.sbomify.com/CVE-2013-0266/): Information disclosure in Red Hat Enterprise Linux OpenStack Platform 5 (Icehouse) (medium 5.5)
- [CVE-2012-4573](https://insights.sbomify.com/CVE-2012-4573/): OpenStack Glance arbitrary deletion of non-protected images (medium 5.5)
- [CVE-2012-5482](https://insights.sbomify.com/CVE-2012-5482/): OpenStack Glance arbitrary deletion of non-protected images (medium 5.5)
- [CVE-2012-3360](https://insights.sbomify.com/CVE-2012-3360/): OpenStack Nova Directory traversal vulnerability (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2012-5571 and fix it if it is affected.

What it is: CVE-2012-5571 is a medium-severity authentication bypass vulnerability in Red Hat OpenStack Platform 13 (Queens), published on 18 Dec 2012. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2012-5571 in the wild and no public exploit code.

Affected packages and fixed versions:
- Keystone (PyPI): affected all versions; fixed in 8.0.0a0
- keystone (PyPI): affected all versions; fixed in 8.0.0a0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2012-5571/ (Markdown: https://insights.sbomify.com/CVE-2012-5571/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2012-5571
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2012-5571
- OSV: https://osv.dev/vulnerability/CVE-2012-5571

---
From sbomify Insights: https://insights.sbomify.com/CVE-2012-5571/
Summaries are generated and may contain mistakes; the official description above is the record.
