Skip to content
GoogleGHSA-5jw3-3rpx-7p27

Harbor: Container Compromise Due to default Credentials

CriticalPublished Jun 28, 2023

### Summary On February 4th 2023, it was observed that a large number of installations of https://github.com/goharbor/harbor use a default JWT key when issuing service tokens. These tokens can be used to push/pull any image from the harbor repo which serves docker containers. The root cause was a default credential used in the configuration of installing Harbor with https://github.com/goharbor/harbor-helm. Harbor security advisory: https://github.com/goharbor/harbor/security/advisories/GHSA-j7jh-fmcm-xxwv ### Severity Critical – this key can be used to impersonate an administrative user and push/pull any image. ### Proof of Concept Users of this vulnerable key can be identified by the “key ID” contained in a JWT token response. To identify this key, visit the url: ``` /service/token?service=harbor-registry&scope=repository:test/test:push ``` A vulnerable instance will contain the string: ``` eyJhbGciOiJSUzI1NiIsImtpZCI6IjdXTUE6S1ZYTzpLRjI1OjM1TkE6R0ozNTpaR0tZOlBHWVQ6STVVVDpUR1dZOlVVSTQ6UFQ3WjpYM0tXIiwidHlwIjoiSldUIn0 ``` Decoded this value is: ``` {"alg":"RS256","kid":"7WMA:KVXO:KF25:35NA:GJ35:ZGKY:PGYT:I5UT:TGWY:UUI4:PT7Z:X3KW","typ":"JWT"} ``` The key identified by this `ki...

GitHub advisory

Affected versions

PackageAffectedFixed in
security-research
Product
< v1.3.18v1.3.18
Details and references

### Summary On February 4th 2023, it was observed that a large number of installations of https://github.com/goharbor/harbor use a default JWT key when issuing service tokens. These tokens can be used to push/pull any image from the harbor repo which serves docker containers. The root cause was a default credential used in the configuration of installing Harbor with https://github.com/goharbor/harbor-helm. Harbor security advisory: https://github.com/goharbor/harbor/security/advisories/GHSA-j7jh-fmcm-xxwv ### Severity Critical – this key can be used to impersonate an administrative user and push/pull any image. ### Proof of Concept Users of this vulnerable key can be identified by the “key ID” contained in a JWT token response. To identify this key, visit the url: ``` /service/token?service=harbor-registry&scope=repository:test/test:push ``` A vulnerable instance will contain the string: ``` eyJhbGciOiJSUzI1NiIsImtpZCI6IjdXTUE6S1ZYTzpLRjI1OjM1TkE6R0ozNTpaR0tZOlBHWVQ6STVVVDpUR1dZOlVVSTQ6UFQ3WjpYM0tXIiwidHlwIjoiSldUIn0 ``` Decoded this value is: ``` {"alg":"RS256","kid":"7WMA:KVXO:KF25:35NA:GJ35:ZGKY:PGYT:I5UT:TGWY:UUI4:PT7Z:X3KW","typ":"JWT"} ``` The key identified by this `kid` value can be found here: https://github.com/goharbor/harbor-helm/blob/a658bcafeb6e4e9797763171fd0c8a0dc2c43d2b/cert/tls.key ### Timeline **Date reported**: 02/18/2023 **Date fixed**: 03/30/2023 **Date disclosed**: 06/28/2023

Severity from
GitHub (reviewed advisory)

More Google advisories

All Google
Advisory
AMD: Information Leak in Zen 2
High7.1Jul 24, 2023
Linux Kernel: eBPF verifier bug
MediumJun 29, 2023
Connect2id: Timing attack in Nimbus-Jose
MediumJun 21, 2023
Portainer: Self-XSS
LowJun 21, 2023
Apple: Airpods Pro Device Link without Key
HighJun 15, 2023
NPM: Ignore Script Bypass
MediumMay 22, 2023

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.