# CVE-2018-11047: Cloud Foundry UAA accepts refresh token as access token on admin endpoints

> Attackers can use refresh tokens to access admin endpoints, bypassing authentication controls and potentially escalating privileges or reading data.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Jul 2018
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-r4v8-9hgx-vm6m

## What is CVE-2018-11047?

CVE-2018-11047 is a high-severity authentication bypass vulnerability in Cloud Foundry UAA, published on 24 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Cloud Foundry UAA, versions 4.19 prior to 4.19.2 and 4.12 prior to 4.12.4 and 4.10 prior to 4.10.2 and 4.7 prior to 4.7.6 and 4.5 prior to 4.5.7, incorrectly authorizes requests to admin endpoints by accepting a valid refresh token in lieu of an access token. Refresh tokens by design have a longer expiration time than access tokens, allowing the possessor of a refresh token to authenticate longer than expected. This affects the administrative endpoints of the UAA. i.e. /Users, /Groups, etc. However, if the user has been deleted or had groups removed, or the client was deleted, the refresh token will no longer be valid.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2018-11047?

10 open source packages ship an affected version, including org.cloudfoundry.identity:cloudfoundry-identity-server. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | All versions | 4.5.7 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | All versions | 4.5.7 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.11.0 | 4.12.4 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.11.0 | 4.12.4 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.13.0 | 4.19.2 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.13.0 | 4.19.2 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.6.0 | 4.7.6 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.6.0 | 4.7.6 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.8.0 | 4.10.2 |
| `org.cloudfoundry.identity:cloudfoundry-identity-server` | Maven | From 4.8.0 | 4.10.2 |

Products: Pivotal Software Cloud Foundry Uaa.

## How do I fix CVE-2018-11047?

Upgrade org.cloudfoundry.identity:cloudfoundry-identity-server to a fixed version for your release line: 4.5.7, 4.12.4, 4.19.2 or 4.7.6.

## Is CVE-2018-11047 being exploited?

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

## Other vulnerabilities in Cloud Foundry UAA

- [CVE-2018-15761](https://insights.sbomify.com/CVE-2018-15761/): UAA Privilege Escalation (critical 9.9)
- [CVE-2019-3794](https://insights.sbomify.com/CVE-2019-3794/): UAA - Login app subject to clickjacking attack (medium 6.5)
- [CVE-2018-11041](https://insights.sbomify.com/CVE-2018-11041/): Cloud Foundry UAA open redirect (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-11047 and fix it if it is affected.

What it is: CVE-2018-11047 is a high-severity authentication bypass vulnerability in Cloud Foundry UAA, published on 24 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-11047 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected all versions; fixed in 4.5.7
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected all versions; fixed in 4.5.7
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.11.0; fixed in 4.12.4
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.11.0; fixed in 4.12.4
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.13.0; fixed in 4.19.2
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.13.0; fixed in 4.19.2
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.6.0; fixed in 4.7.6
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.6.0; fixed in 4.7.6
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.8.0; fixed in 4.10.2
- org.cloudfoundry.identity:cloudfoundry-identity-server (Maven): affected from 4.8.0; fixed in 4.10.2

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-2018-11047/ (Markdown: https://insights.sbomify.com/CVE-2018-11047/index.md)
```

## Sources

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

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