Summary
OpenList: Arbitrary File Read via Path Prefix Confusion in Share Creation API
An authorization bypass vulnerability exists in the file sharing mechanism of Openlist. Due to a flawed, non-separator-aware path validation check, an authenticated user can create share links for files outside their restricted base directory. This allows an attacker to bypass tenant/user isolation and gain unauthorized read access to arbitrary files within the system.
Details
When a user attempts to create or update a file share, the application must verify that the requested file path falls within the user's assigned BasePath. However, in server/handles/sharing.go, this authorization check relies on a simple string prefix function: strings.HasPrefix(requested_path, user.BasePath).
Because strings.HasPrefix does not account for directory separators (e.g., /), an attacker whose BasePath is assigned to /base can supply a target path like /base2/secret_document.txt. The validation strings.HasPrefix("/base2/secret_document.txt", "/base") evaluates to true, successfully passing the authorization filter.
Once the share is created, the public share download/list handlers unwrap and serve the file based on the stored absolute path without re-verifying the creator's current directory scope, granting the attacker horizontal access to unauthorized data.
PoC
Prerequisites:
- A system with at least two distinct directories at the root level:
/baseand/base2. - A sensitive file exists at
/base2/secret.txt. - An attacker account with the
CanSharepermission enabled and itsBase pathstrictly limited to/base.
Exploitation Steps:
- Log in as the attacker account and obtain the JWT authorization token.
- Send a
POSTrequest to create a new share, intentionally targeting the unauthorized sibling directory/base2:
POST /api/share/create HTTP/1.1
Host: <your-openlist-host>
Authorization: <attacker-jwt-token>
Content-Type: application/json
{
"files": ["/base2/secret.txt"],
"pwd": "",
"max_accessed": 0
}
Observe the bypass: The API accepts the request and responds with a successful share creation message, returning a share_id.
The attacker can now access the public share endpoint (e.g., via the web UI or API /api/fs/list / /sd/<share-id>/...) to download or view /base2/secret.txt, completely bypassing their directory restrictions.
Remediation Recommendations
Canonical Path Containment: Replace the raw strings.HasPrefix check with a robust, separator-aware path containment validation. Ensure both paths are normalized, and use logic such as: target == base || strings.HasPrefix(target, base + "/").
Centralized Validation Utility: Implement a dedicated function (e.g., utils.IsSubPath(base, target)) and apply it consistently across share creation, updating, and viewing handlers to prevent regressions.
Credits
- Thai Son Dinh from VinSOC Labs (R&D)
Impact
This is a High-severity Horizontal and Vertical Privilege Escalation vulnerability. A malicious user with basic sharing privileges can weaponize this path confusion to expose, read, and download any file from other users' directories or internal application paths, provided the target path shares the same string prefix as their own directory. This completely breaks the data isolation guarantees of the application.
GHSA-86CX-WWF4-PHQ4 has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.2.4); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-86CX-WWF4-PHQ4? GHSA-86CX-WWF4-PHQ4 is a medium-severity security vulnerability in github.com/OpenListTeam/OpenList/v4 (go), affecting versions <= 4.2.3. It is fixed in 4.2.4.
- How severe is GHSA-86CX-WWF4-PHQ4? GHSA-86CX-WWF4-PHQ4 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/OpenListTeam/OpenList/v4 are affected by GHSA-86CX-WWF4-PHQ4? github.com/OpenListTeam/OpenList/v4 (go) versions <= 4.2.3 is affected.
- Is there a fix for GHSA-86CX-WWF4-PHQ4? Yes. GHSA-86CX-WWF4-PHQ4 is fixed in 4.2.4. Upgrade to this version or later.
- Is GHSA-86CX-WWF4-PHQ4 exploitable, and should I be worried? Whether GHSA-86CX-WWF4-PHQ4 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-86CX-WWF4-PHQ4 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-86CX-WWF4-PHQ4? Upgrade
github.com/OpenListTeam/OpenList/v4to 4.2.4 or later.