Miggo Logo

CVE-2018-25059: pastebinit Path Traversal vulnerability

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.27038%
Published
12/30/2022
Updated
2/3/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/jessfraz/pastebinitgo< 0.2.30.2.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The commit diff shows the vulnerability was in the filename construction logic within pasteHandler. The original code directly joined user-controlled r.URL.Path with the storage directory without proper sanitization. The patch added path.Clean and filepath.FromSlash to neutralize traversal sequences. Multiple sources (CVE description, GHSA, and commit message) explicitly attribute the vulnerability to this function's handling of r.URL.Path.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

* vuln*r**ility w*s *oun* in p*st**init up to *.*.* *n* *l*ssi*i** *s pro*l*m*ti*. *****t** *y t*is issu* is t** *un*tion p*st***n*l*r o* t** *il* s*rv*r.*o. T** m*nipul*tion o* t** *r*um*nt `r.URL.P*t*` l***s to p*t* tr*v*rs*l. Up*r**in* to v*rsion

Reasoning

T** *ommit *i** s*ows t** vuln*r**ility w*s in t** `*il*n*m*` *onstru*tion lo*i* wit*in `p*st***n*l*r`. T** ori*in*l *o** *ir**tly join** us*r-*ontroll** `r.URL.P*t*` wit* t** stor*** *ir**tory wit*out prop*r s*nitiz*tion. T** p*t** ***** `p*t*.*l**n