Miggo Logo

CVE-2019-11229: Gitea Remote Code Execution

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.96592%
Published
2/15/2022
Updated
9/15/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/go-gitea/giteago< 1.7.61.7.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper handling of mirror repository URLs in three key areas:

  1. remoteAddress function's insecure config parsing allowed reading malicious git configs
  2. SaveAddress function's insecure config writing enabled injection of SSH commands
  3. SettingsPost controller lacked proper URL validation Together these allowed attackers to inject git config directives through the mirror URL field. The patches replace ini-based config handling with secure git commands and add strict URL validation using xurls, indicating these were the vulnerable points. Runtime exploitation would show activity in these URL processing and git config manipulation functions.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

mo**ls/r*po_mirror.*o in *it** ***or* *.*.* *n* *.*.x ***or* *.*-R** mis**n*l*s mirror r*po URL s*ttin*s, l***in* to r*mot* *o** *x**ution.

Reasoning

T** vuln*r**ility st*ms *rom improp*r **n*lin* o* mirror r*pository URLs in t*r** k*y *r**s: *. r*mot****r*ss *un*tion's ins**ur* *on*i* p*rsin* *llow** r***in* m*li*ious *it *on*i*s *. S*v****r*ss *un*tion's ins**ur* *on*i* writin* *n**l** inj**tion