GHSA-p6ph-3jx2-3337: OpenList Search Metadata/count Disclosure Vulnerability

MODERATE
CVSS 4.3
CWE-639 CWE-200
Published
Advisory Summary

GHSA-p6ph-3jx2-3337 is a MODERATE (CVSS 4.3) search metadata/count disclosure vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting OpenList libraries in the Go ecosystem. The issue involves search metadata/count disclosure via non-separator-aware path check in bleve search. Remediation is available by upgrading affected packages to version 4.2.4.

GHSA-p6ph-3jx2-3337 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-p6ph-3jx2-3337
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product OpenList
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-p6ph-3jx2-3337

To remediate this vulnerability, upgrade all affected OpenList dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/OpenListTeam/OpenList/v4 fixed: 4.2.4
Upgrade github.com/OpenListTeam/OpenList/v4 to 4.2.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/OpenListTeam/OpenList/v4

How to Check if You Are Affected

To determine whether your application is affected by GHSA-p6ph-3jx2-3337, inspect your project dependencies for OpenList:

inspect dependencies for github.com/OpenListTeam/OpenList/v4

Analyze the terminal output to locate any version of OpenList in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In OpenList, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: 1. **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 a `BasePath` restricted to `/base` will successfully pass the authorization check for a completely separate directory named `/base2` (since "/base2" starts with "/base"). 2. **Unfiltered Total Count Leakage:** The `bleve` backend (`internal/search/bleve/search.go`) searches the index globally and ignores the `req.Parent` boundary. Even if the application later successfully filters out unauthorized items from the `Content` array (e.g., via `CanAccess` meta password checks), it still returns the raw `Total` count 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 the `Total` count. ### PoC **Prerequisites:** 1. Log in as an administrator and set the Search Index Mode to `bleve`. Build the index. 2. Create two directories at the root level: `/base` and `/base2`. 3. Upload a sensitive file into the unauthorized directory: `/base2/secret_financial_report.pdf`. 4. Create a low-privileged test user and strictly set their `Base path` to `/base`. **Exploitation Steps:** 1. Authenticate as the newly created low-privileged user. 2. Send the following HTTP request to the search API: ```http 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 } ``` 3. Observe the response: Due to the prefix bypass (`strings.HasPrefix("/base2", "/base") == true`), the metadata for `secret_financial_report.pdf` will 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. <img width="2112" height="1381" alt="image" src="https://github.com/user-attachments/assets/9f8c5e18-8744-4363-8d3f-5e6cf691f061" /> ### 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 1. 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(). 2. 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. 3. Accurate Total Calculation: Compute the Total count only after all authorization and path filters have been applied to the result set.

GHSA-p6ph-3jx2-3337 Affected OpenList Versions

1 component(s)
Fixed Versions:
4.2.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/OpenListTeam/OpenList/v4
Go
< 4.2.4
4.2.4

References

Frequently Asked Questions

What is GHSA-p6ph-3jx2-3337?
GHSA-p6ph-3jx2-3337 is a security vulnerability in OpenList involving Search metadata/count disclosure via Non-Separator-Aware Path Check in Bleve Search under CWE-639: Authorization Bypass Through User-Controlled Key.
Which OpenList versions are affected?
Affected versions include releases prior to 4.2.4 across affected packages: github.com/OpenListTeam/OpenList/v4.
What version fixes GHSA-p6ph-3jx2-3337?
Upgrading to 4.2.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/OpenListTeam/OpenList/v4 affected?
Yes, github.com/OpenListTeam/OpenList/v4 is affected in releases prior to 4.2.4. Upgrade your dependency to 4.2.4 or later.
What is the CVSS score of GHSA-p6ph-3jx2-3337?
GHSA-p6ph-3jx2-3337 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-p6ph-3jx2-3337?
GHSA-p6ph-3jx2-3337 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Go dependencies for GHSA-p6ph-3jx2-3337?
Run the dependency tree command: 'inspect dependencies for github.com/OpenListTeam/OpenList/v4'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p6ph-3jx2-3337",
  "modified" : "2026-07-24T22:32:17Z",
  "published" : "2026-07-24T22:32:17Z",
  "aliases" : [ ],
  "summary" : "OpenList: Search metadata/count disclosure via Non-Separator-Aware Path Check in Bleve Search",
  "details" : "### Summary\nAn 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.\n\n### Details\nThis vulnerability stems from two combined logic flaws when the `bleve` search engine is utilized:\n\n1. **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 a `BasePath` restricted to `/base` will successfully pass the authorization check for a completely separate directory named `/base2` (since \"/base2\" starts with \"/base\").\n\n2. **Unfiltered Total Count Leakage:** The `bleve` backend (`internal/search/bleve/search.go`) searches the index globally and ignores the `req.Parent` boundary. Even if the application later successfully filters out unauthorized items from the `Content` array (e.g., via `CanAccess` meta password checks), it still returns the raw `Total` count 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 the `Total` count.\n\n### PoC\n**Prerequisites:**\n1. Log in as an administrator and set the Search Index Mode to `bleve`. Build the index.\n2. Create two directories at the root level: `/base` and `/base2`.\n3. Upload a sensitive file into the unauthorized directory: `/base2/secret_financial_report.pdf`.\n4. Create a low-privileged test user and strictly set their `Base path` to `/base`.\n\n**Exploitation Steps:**\n1. Authenticate as the newly created low-privileged user.\n2. Send the following HTTP request to the search API:\n```http\nPOST /api/fs/search HTTP/1.1\nHost: <your-openlist-host>\nAuthorization: <test-user-token>\nContent-Type: application/json\n\n{\n  \"parent\": \"/\",\n  \"keywords\": \"secret\",\n  \"page\": 1,\n  \"per_page\": 20,\n  \"scope\": 0\n}\n```\n3. Observe the response: Due to the prefix bypass (`strings.HasPrefix(\"/base2\", \"/base\") == true`), the metadata for `secret_financial_report.pdf` will be leaked in the response Content.\n    - 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.\n \n<img width=\"2112\" height=\"1381\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9f8c5e18-8744-4363-8d3f-5e6cf691f061\" />\n\n### Impact\nThis 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.\n\n### Remediation Recommendations\n1. 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().\n2. 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.\n3. Accurate Total Calculation: Compute the Total count only after all authorization and path filters have been applied to the result set.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/OpenListTeam/OpenList/v4"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.2.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.2.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/OpenListTeam/OpenList/security/advisories/GHSA-p6ph-3jx2-3337"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenListTeam/OpenList/commit/59bd3431408578f420895457554700cc9a52375a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenListTeam/OpenList/commit/84ecda35aae2bd0020474086e6ddfd3aa2340679"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OpenListTeam/OpenList"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenListTeam/OpenList/releases/tag/v4.2.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-639" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-24T22:32:17Z",
    "nvd_published_at" : null
  }
}