| Titre | RainyGao DocSys 2.02.88 Path Traversal |
|---|
| Description | DocSys (also known as MxsDoc) 2.02.88 allows an unauthenticated remote attacker
to read arbitrary files from the server filesystem.
The endpoint /Doc/downloadDocRS.do accepts three Base64 encoded parameters
(remoteDirectory, path, name) together with an authorization code. When the
parameter reposId is omitted, the handler skips the repository permission check
entirely and calls sendTargetToWebPage() with the concatenation of the supplied
directory, path and file name. No path normalization or canonicalization is
applied to the resulting path.
The authorization code is validated through checkAuthCode(authCode, null, ...).
The second argument denotes the expected usage of the code; because it is passed
as null, the intended usage is never compared and any valid code is accepted for
this endpoint. A suitable code can be obtained without authentication from
/Manage/getDocSysInitConfig.do, which returns docSysInitAuthCode in its JSON
response. That endpoint is reachable because the request interceptor
unconditionally allows requests carrying the X-Requested-With: XMLHttpRequest
header, which is fully client controlled.
The issue was confirmed on version 2.02.88 by reading /etc/passwd,
with no session cookie present.
Affected source locations:
- src/com/DocSystem/controller/DocController.java (downloadDocRS, reposId null branch)
- src/com/DocSystem/controller/BaseController.java (checkAuthCode)
- src/com/DocSystem/controller/MyInterceptor.java (preHandle)
The full reproduction sequence is:
1. POST /DocSystem/Manage/getDocSysInitConfig.do with header
X-Requested-With: XMLHttpRequest
-> response contains docSysInitAuthCode
2. GET /DocSystem/Doc/downloadDocRS.do
?authCode=<code>
&remoteDirectory=<base64 of "/etc/">
&path=<base64 of "/">
&name=<base64 of "passwd">
-> HTTP 200, body is the content of /etc/passwd |
|---|
| La source | ⚠️ https://github.com/RainyGao-GitHub/DocSys/issues/50 |
|---|
| Utilisateur | SinDog (UID 102463) |
|---|
| Soumission | 24/10/2026 09:06 (il y a 1 mois) |
|---|
| Modérer | 23/11/2026 13:14 (1 month later) |
|---|
| Statut | Accepté |
|---|
| Entrée VulDB | 442300 [RainyGao DocSys jusqu’à 2.02.91 DocController.java downloadDocRS path directory traversal] |
|---|
| Points | 20 |
|---|