Miggo Logo

CVE-2022-21689:
Denial of Service in Onionshare

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.30334%
Published
1/21/2022
Updated
10/8/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
onionshare-clipip< 2.52.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the directory creation mechanism shown in lines 386-427 of receive_mode.py. The code uses second-based timestamps for directory names and implements a failsafe loop capped at 100 iterations to handle collisions. This creates an artificial limit of 100 uploads/second that can be easily saturated by attackers. The function's design to prevent directory collisions inadvertently creates a resource consumption bottleneck, directly enabling the documented DoS vulnerability through uncontrolled resource consumption (CWE-400). The provided code snippet and subsequent fix (using microseconds in directory names) confirm this as the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

**tw**n S*pt*m**r **, **** *n* O*to**r *, ****, [R**i**lly Op*n S**urity](*ttps://www.r**i**llyop*ns**urity.*om/) *on*u*t** * p*n*tr*tion t*st o* OnionS**r* *.*, *un*** *y t** Op*n T***nolo*y *un*'s [R** T**m l**](*ttps://www.op*nt***.*un*/l**s/r**-t

Reasoning

T** vuln*r**ility st*ms *rom t** *ir**tory *r**tion m****nism s*own in lin*s ***-*** o* `r***iv*_mo**.py`. T** *o** us*s s**on*-**s** tim*st*mps *or *ir**tory n*m*s *n* impl*m*nts * **ils*** loop **pp** *t *** it*r*tions to **n*l* *ollisions. T*is *r