CVE-2022-31268: Path traversal in Gitblit
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.99031%
CWE
Published
5/22/2022
Updated
1/27/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
com.gitblit:gitblit | maven | <= 1.9.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability manifests in resource handling via '/resources//../' patterns. In Java web applications, servlets typically map URL patterns to file system paths. The PoC shows traversal through WEB-INF/META-INF
paths, which are protected directories. The double-slash and '../' sequence suggests inadequate path normalization in the resource-serving logic. The ResourceServlet
class (common name pattern in Java web apps) would logically handle '/resources/*' requests. The vulnerability stems from directly using unsanitized URL-derived paths when accessing files, without resolving canonical paths or checking for directory escapes. This matches CWE-22
's improper path limitation pattern.