CVE-2020-29662: CNCF Harbor catalog's registry v2 API unauthenticated access
The Harbor registry's v2 catalog API, which should only be accessible to administrators, could be accessed without authentication by adding a trailing slash to the request. An attacker could list all repositories and artifacts stored in the registry.
business.blogthinkbig.com
Published on business.blogthinkbig.com
On December 2nd, ElevenPaths’ CTO SRE team discovered an unauthenticated API within Harbor, a cloud native registry part of the CNCF. It is commonly used as an agnostic Docker registry and Helm artifact server across cloud native deployments.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The authentication middleware used regex patterns to identify request intents, and the pattern for the catalog API did not match requests with a trailing slash, so no intent was assigned and the request was authorised by default.
Impact
An unauthenticated attacker could list all resources available within the registry, potentially exposing information about stored images and artifacts.
What the attacker needed
Harbor instance with vulnerable version; Network access to the Harbor API
The fix
Harbor released patches for versions 2.0.* and 2.1.* that fix the vulnerability; if patching is not possible, redirecting the catalog API to an HTTP sink is recommended as an alternative.
How it was found
- Send a request to the v2 catalog API endpoint with an extra trailing slash.
- Observe that the request is handled by the catalog API but bypasses authorization.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Harbor is a system for storing and sharing container images. Normally, only an administrator can see the full list of everything stored. A mistake in how the system checked permissions meant that adding an extra slash at the end of the web address let anyone see that list without logging in.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.