Miggo Logo

CVE-2022-31671: Harbor fails to validate the user permissions when reading job execution logs through the P2P preheat execution logs

5

CVSS Score
3.1

Basic Information

EPSS Score
0.22076%
Published
9/9/2022
Updated
11/19/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/goharbor/harborgo>= 1.0.0, <= 1.10.121.10.13
github.com/goharbor/harborgo>= 2.0.0, <= 2.4.22.4.3
github.com/goharbor/harborgo>= 2.5.0, <= 2.5.12.5.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper authorization in the API endpoint handling P2P preheat logs. While exact code isn't available, Harbor's architecture suggests preheat controllers handle these requests. The explicit API path in the advisory maps to a handler function that would retrieve logs. The CWE-285/863 classification indicates missing authorization checks in the request handling flow. The function would need to 1) resolve project/policy context and 2) verify user access - the vulnerability suggests either step was missing or incomplete. The pattern matches common IDOR vulnerabilities where handlers trust resource IDs without ownership validation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t **r*or **ils to v*li**t* t** us*r p*rmissions w**n r***in* jo* *x**ution lo*s t*rou** t** P*P pr****t *x**ution lo*s - *PI **ll   **T /proj**ts/{proj**t_n*m*}/pr****t/poli*i*s/{pr****t_poli*y_n*m*}/*x**utions/{*x**ution_i*}/t*sks/{t*sk_i*

Reasoning

T** vuln*r**ility st*ms *rom improp*r *ut*oriz*tion in t** *PI *n*point **n*lin* P*P pr****t lo*s. W*il* *x**t *o** isn't *v*il**l*, **r*or's *r**it**tur* su***sts pr****t *ontroll*rs **n*l* t**s* r*qu*sts. T** *xpli*it *PI p*t* in t** **visory m*ps