GHSA-p6ph-3jx2-3337
MEDIUMOpenList: Search metadata/count disclosure via Non-Separator-Aware Path Check in Bleve Search
Blast Radius
github.com/OpenListTeam/OpenList/v4Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
An authorization bypass and information disclosure vulnerability exists in the search API of Openlist. Due to a non-separator-aware path check and unfiltered backend counting, a low-privileged user can bypass their assigned BasePath restrictions to discover and access metadata of files residing in unauthorized sibling directories.
Details
This vulnerability stems from two combined logic flaws when the bleve search engine is utilized:
-
Insecure Path Prefix Validation: In the search handler (
server/handles/search.go), the application attempts to restrict search results to the user's allowed namespace using a simple prefix check:strings.HasPrefix(node.Parent, user.BasePath). Because this function is not path-separator aware, a user with aBasePathrestricted to/basewill successfully pass the authorization check for a completely separate directory named/base2(since "/base2" starts with "/base"). -
Unfiltered Total Count Leakage: The
blevebackend (internal/search/bleve/search.go) searches the index globally and ignores thereq.Parentboundary. Even if the application later successfully filters out unauthorized items from theContentarray (e.g., viaCanAccessmeta password checks), it still returns the rawTotalcount provided by the search backend. This allows an attacker to perform blind data-enumeration, confirming the existence of sensitive files outside their namespace by observing theTotalcount.
PoC
Prerequisites:
- Log in as an administrator and set the Search Index Mode to
bleve. Build the index. - Create two directories at the root level:
/baseand/base2. - Upload a sensitive file into the unauthorized directory:
/base2/secret_financial_report.pdf. - Create a low-privileged test user and strictly set their
Base pathto/base.
Exploitation Steps:
- Authenticate as the newly created low-privileged user.
- Send the following HTTP request to the search API:
POST /api/fs/search HTTP/1.1
Host: <your-openlist-host>
Authorization: <test-user-token>
Content-Type: application/json
{
"parent": "/",
"keywords": "secret",
"page": 1,
"per_page": 20,
"scope": 0
}
- Observe the response: Due to the prefix bypass (
strings.HasPrefix("/base2", "/base") == true), the metadata forsecret_financial_report.pdfwill be leaked in the response Content.- Alternatively, even if access is further blocked by folder-level passwords, the Total field will return > 0, allowing the attacker to blindly confirm the existence of the keyword "secret" in unauthorized global directories.
Impact
This is an Information Disclosure and Horizontal/Vertical Privilege Escalation vulnerability. Any authenticated user can enumerate hidden infrastructure, verify the existence of sensitive files (e.g., passwords, internal documents), and extract file metadata across the entire storage namespace, completely defeating the BasePath isolation mechanism.
Remediation Recommendations
- Separator-Aware Path Containment: Replace strings.HasPrefix with a robust path containment check. For example: target == base || strings.HasPrefix(target, base + "/"), or use a dedicated utility like utils.IsSubPath().
- Backend-Level Filtering: Enforce the path boundary within the bleve query itself (e.g., using indexed parent path hashes) rather than relying solely on post-query API filtering.
- Accurate Total Calculation: Compute the Total count only after all authorization and path filters have been applied to the result set.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/OpenListTeam/OpenList/v4 | all versions | 4.2.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/OpenListTeam/OpenList/v4. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/OpenListTeam/OpenList/v4 to 4.2.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-p6ph-3jx2-3337 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-p6ph-3jx2-3337 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-p6ph-3jx2-3337. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-p6ph-3jx2-3337 in your dependencies?
O3 detects GHSA-p6ph-3jx2-3337 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.