Miggo Logo

GHSA-77hh-43cm-v8j6: tuf's Metadata API: Targets.get_delegated_role() is missing input validation

N/A

CVSS Score

Basic Information

CVE ID
-
EPSS Score
-
CWE
-
Published
2/16/2024
Updated
2/16/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
tufpip>= 2.0.0, < 3.1.13.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability description explicitly names tuf.api.metadata.Targets.get_delegated_role() as the primary function with missing input validation. The provided patches (both 77cb66bc and eb4834d9 show the same change) directly modify this function in tuf/api/metadata.py. The diff shows that a conditional check if succinct.is_delegated_role(delegated_role): was added. Before this change, if self.delegations.roles was None (indicating the use of succinct delegations, as self.delegations.succinct_roles would be used instead), the code would assign self.delegations.succinct_roles to role without verifying if the delegated_role string was actually a role defined within the succinct_roles object. This lack of validation is the core of the vulnerability. The description also mentions Targets.verify_delegate() and Targets.get_verification_result() as being impacted, likely because they use get_delegated_role() internally. However, the patch only directly modifies get_delegated_role(), so it's the most direct vulnerable function identifiable from the patch evidence.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T** s**urity o* *ot* * TU* *li*nt *n* r*pository impl*m*nt*tions **p*n* on t** *on**pt o* trust** M*t***t* o*j**ts v*ri*yin* t** si*n*tur*s ov*r ot**r M*t***t* t**t it **l***t*s to. T*is v*ri*i**tion pro**ss us*s `T*r**ts.**t_**l***t**_rol*(**l***t**

Reasoning

T** vuln*r**ility **s*ription *xpli*itly n*m*s `tu*.*pi.m*t***t*.T*r**ts.**t_**l***t**_rol*()` *s t** prim*ry *un*tion wit* missin* input v*li**tion. T** provi*** p*t***s (*ot* ******** *n* ******** s*ow t** s*m* ***n**) *ir**tly mo*i*y t*is *un*tion