CVE-2026-55496: Cloudreve Information Exposure Vulnerability

MODERATE
Advisory Identifier: GHSA-8r7f-r8hj-r3rv
CVSS 4.3
CWE-200 CWE-359
Published
Advisory Summary

CVE-2026-55496 is a MODERATE (CVSS 4.3) information exposure vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Cloudreve libraries in the Go ecosystem. The issue involves information exposure in `get /api/v4/user/search`: `searchactive` omits the active-status predicate, leaking inactive/banned account emails. Remediation is available by upgrading affected packages to version 4.0.0-20260613023921-7e1289d55279.

CVE-2026-55496 at a Glance

CVE Identifier CVE-2026-55496
GHSA Identifier GHSA-8r7f-r8hj-r3rv
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Cloudreve
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 CVE-2026-55496

To remediate this vulnerability, upgrade all affected Cloudreve 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/cloudreve/Cloudreve/v4 fixed: 4.0.0-20260613023921-7e1289d55279
Upgrade github.com/cloudreve/Cloudreve/v4 to 4.0.0-20260613023921-7e1289d55279
github.com/cloudreve/Cloudreve/v3 fixed: Latest secure release
Upgrade github.com/cloudreve/Cloudreve/v3 to Latest secure release
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/cloudreve/Cloudreve/v4

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-55496, inspect your project dependencies for Cloudreve:

inspect dependencies for github.com/cloudreve/Cloudreve/v4

Analyze the terminal output to locate any version of Cloudreve in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0-20260613023921-7e1289d55279), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Cloudreve, 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 `GET /api/v4/user/search` is available to any logged-in user. The service calls `userClient.SearchActive`, but despite its name that method filters only by email/nickname keyword and **never adds a `StatusActive` predicate** — while the sibling lookups `GetActiveByID` and `GetActiveByDavAccount`, defined a few lines above it, do. Search hits are serialized at `RedactLevelUser`, which includes the email address. A normal logged-in user can therefore enumerate and retrieve the email (plus nickname, avatar, creation time, redacted group, profile share-visibility) of **inactive and banned** accounts that an active-user directory is supposed to suppress. No global status interceptor compensates — the only User query interceptor is soft-delete, and inactive/banned rows are not soft-deleted. ### Details ## Root cause (verified at `26b6b10`) **1. Route — logged-in + `UserInfo.Read` scope** (`routers/router.go`): ```go user := v4.Group("user") // protected user group (login required) user.GET("search", middleware.RequiredScopes(types.ScopeUserInfoRead), controllers.FromQuery[usersvc.SearchUserService](...), controllers.UserSearch) ``` The `RequiredScopes` check applies to scoped OAuth tokens; plain session requests are not gated by it — so any logged-in user reaches the search. **2. Service — 2-char keyword to `SearchActive`** (`service/user/info.go`): ```go type SearchUserService struct { Keyword string `form:"keyword" binding:"required,min=2"` } const resultLimit = 10 func (s *SearchUserService) Search(c *gin.Context) ([]*ent.User, error) { return dep.UserClient().SearchActive(c, resultLimit, s.Keyword) } ``` **3. The bug — `SearchActive` has no status predicate** (`inventory/user.go`): ```go func (c *userClient) SearchActive(ctx context.Context, limit int, keyword string) ([]*ent.User, error) { ctx = context.WithValue(ctx, LoadUserGroup{}, true) return withUserEagerLoading(ctx, c.client.User.Query(). Where(user.Or(user.EmailContainsFold(keyword), user.NickContainsFold(keyword))). Limit(limit), // <-- no user.StatusEQ(user.StatusActive) ).All(ctx) } ``` Contrast the siblings immediately above: ```go func (c *userClient) GetActiveByID(...) { ... Where(user.ID(id)).Where(user.StatusEQ(user.StatusActive)) ... } func (c *userClient) GetActiveByDavAccount(...) { ... Where(user.EmailEqualFold(email)).Where(user.StatusEQ(user.StatusActive)) ... } ``` `withUserEagerLoading` only eager-loads the group/passkey edges; it adds no status filter. Status values are `active`/`inactive`/`manual_banned`/`sys_banned` (`ent/user/user.go`). **4. No global status interceptor** — `User.Mixin()` is `CommonMixin{}` (`ent/schema/user.go`), whose `Interceptors()` returns only `softDeleteInterceptors` (`ent/schema/common.go`). Inactive/banned users are not soft-deleted, so nothing filters them out at query time. **5. Results serialized with email** (`routers/controllers/user.go` → `service/user/response.go`): ```go // UserSearch: return user.BuildUserRedacted(item, user.RedactLevelUser, hasher) // BuildUserRedacted: if level == RedactLevelUser { user.Email = userRaw.Email } // email included ``` **Secondary path:** `GET /api/v4/user/info/:id` → `GetUser` uses `GetByID` (no status filter), and the controller picks `RedactLevelUser` for any non-anonymous caller (`RedactLevelAnonymous` only for anonymous). So a logged-in caller with an inactive/banned user's hashed ID also receives the email-bearing profile. (Less practical than search, since it needs the hashed ID rather than a 2-char keyword.) ## Steps to reproduce (requires a live instance) 1. Ensure a target account exists in `inactive` or `manual_banned`/`sys_banned` status (e.g., an unconfirmed registration or a banned user). 2. As any logged-in user: ``` GET /api/v4/user/search?keyword=<>=2 chars of the target email/nick> Cookie: cloudreve-session=<attacker-session> ``` 3. Observe the inactive/banned account in the results, including its `email`. **Expected:** only active accounts appear (matching the method name and the sibling `GetActive*` behavior). **Actual:** inactive/banned accounts are returned with their email addresses. ## Impact Any logged-in user can enumerate and harvest the email addresses (and basic profile metadata) of inactive and banned accounts that active-user lookups intentionally hide. No account access, passwords, or 2FA secrets are exposed; the impact is PII leakage and user enumeration. ## Remediation - Add `Where(user.StatusEQ(user.StatusActive))` to `SearchActive` (matching `GetActiveByID`). - Apply the same active-status requirement to `GET /api/v4/user/info/:id`, or fall back to anonymous-level redaction unless the target account is active. - Consider not returning email from directory search at all — display name + hashed ID is usually sufficient. - Regression tests: searching a keyword that matches an inactive/banned account must return no result (or no email).

CVE-2026-55496 Affected Cloudreve Versions

2 component(s)
Fixed Versions:
4.0.0-20260613023921-7e1289d55279
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cloudreve/Cloudreve/v4
Go
< 4.0.0-20260613023921-7e1289d55279
4.0.0-20260613023921-7e1289d55279
github.com/cloudreve/Cloudreve/v3
Go
≤ 3.0.0-20250225100611-da4e44b77af4

References

Frequently Asked Questions

What is CVE-2026-55496?
CVE-2026-55496 is a security vulnerability in Cloudreve involving Information Exposure in `GET /api/v4/user/search`: `SearchActive` omits the active-status predicate, leaking inactive/banned account emails under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Cloudreve versions are affected?
Affected versions include releases prior to 4.0.0-20260613023921-7e1289d55279 across affected packages: github.com/cloudreve/Cloudreve/v4, github.com/cloudreve/Cloudreve/v3.
What version fixes CVE-2026-55496?
Upgrading to 4.0.0-20260613023921-7e1289d55279 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cloudreve/Cloudreve/v4 affected?
Yes, github.com/cloudreve/Cloudreve/v4 is affected in releases prior to 4.0.0-20260613023921-7e1289d55279. Upgrade your dependency to 4.0.0-20260613023921-7e1289d55279 or later.
Is github.com/cloudreve/Cloudreve/v3 affected?
Yes, github.com/cloudreve/Cloudreve/v3 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-55496?
CVE-2026-55496 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 CVE-2026-55496?
CVE-2026-55496 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Go dependencies for CVE-2026-55496?
Run the dependency tree command: 'inspect dependencies for github.com/cloudreve/Cloudreve/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-8r7f-r8hj-r3rv",
  "modified" : "2026-07-24T20:46:49Z",
  "published" : "2026-07-24T20:46:49Z",
  "aliases" : [ "CVE-2026-55496" ],
  "summary" : "Cloudreve: Information Exposure in `GET /api/v4/user/search`: `SearchActive` omits the active-status predicate, leaking inactive/banned account emails",
  "details" : "## Summary\n \n`GET /api/v4/user/search` is available to any logged-in user. The service calls `userClient.SearchActive`, but despite its name that method filters only by email/nickname keyword and **never adds a `StatusActive` predicate** — while the sibling lookups `GetActiveByID` and `GetActiveByDavAccount`, defined a few lines above it, do. Search hits are serialized at `RedactLevelUser`, which includes the email address.\n \nA normal logged-in user can therefore enumerate and retrieve the email (plus nickname, avatar, creation time, redacted group, profile share-visibility) of **inactive and banned** accounts that an active-user directory is supposed to suppress. No global status interceptor compensates — the only User query interceptor is soft-delete, and inactive/banned rows are not soft-deleted.\n\n### Details\n## Root cause (verified at `26b6b10`)\n \n**1. Route — logged-in + `UserInfo.Read` scope** (`routers/router.go`):\n```go\nuser := v4.Group(\"user\")            // protected user group (login required)\nuser.GET(\"search\",\n    middleware.RequiredScopes(types.ScopeUserInfoRead),\n    controllers.FromQuery[usersvc.SearchUserService](...), controllers.UserSearch)\n```\nThe `RequiredScopes` check applies to scoped OAuth tokens; plain session requests are not gated by it — so any logged-in user reaches the search.\n \n**2. Service — 2-char keyword to `SearchActive`** (`service/user/info.go`):\n```go\ntype SearchUserService struct { Keyword string `form:\"keyword\" binding:\"required,min=2\"` }\nconst resultLimit = 10\nfunc (s *SearchUserService) Search(c *gin.Context) ([]*ent.User, error) {\n    return dep.UserClient().SearchActive(c, resultLimit, s.Keyword)\n}\n```\n \n**3. The bug — `SearchActive` has no status predicate** (`inventory/user.go`):\n```go\nfunc (c *userClient) SearchActive(ctx context.Context, limit int, keyword string) ([]*ent.User, error) {\n    ctx = context.WithValue(ctx, LoadUserGroup{}, true)\n    return withUserEagerLoading(ctx,\n        c.client.User.Query().\n            Where(user.Or(user.EmailContainsFold(keyword), user.NickContainsFold(keyword))).\n            Limit(limit),                       // <-- no user.StatusEQ(user.StatusActive)\n    ).All(ctx)\n}\n```\nContrast the siblings immediately above:\n```go\nfunc (c *userClient) GetActiveByID(...)        { ... Where(user.ID(id)).Where(user.StatusEQ(user.StatusActive)) ... }\nfunc (c *userClient) GetActiveByDavAccount(...) { ... Where(user.EmailEqualFold(email)).Where(user.StatusEQ(user.StatusActive)) ... }\n```\n`withUserEagerLoading` only eager-loads the group/passkey edges; it adds no status filter. Status values are `active`/`inactive`/`manual_banned`/`sys_banned` (`ent/user/user.go`).\n \n**4. No global status interceptor** — `User.Mixin()` is `CommonMixin{}` (`ent/schema/user.go`), whose `Interceptors()` returns only `softDeleteInterceptors` (`ent/schema/common.go`). Inactive/banned users are not soft-deleted, so nothing filters them out at query time.\n \n**5. Results serialized with email** (`routers/controllers/user.go` → `service/user/response.go`):\n```go\n// UserSearch:\nreturn user.BuildUserRedacted(item, user.RedactLevelUser, hasher)\n// BuildUserRedacted:\nif level == RedactLevelUser { user.Email = userRaw.Email }   // email included\n```\n \n**Secondary path:** `GET /api/v4/user/info/:id` → `GetUser` uses `GetByID` (no status filter), and the controller picks `RedactLevelUser` for any non-anonymous caller (`RedactLevelAnonymous` only for anonymous). So a logged-in caller with an inactive/banned user's hashed ID also receives the email-bearing profile. (Less practical than search, since it needs the hashed ID rather than a 2-char keyword.)\n\n## Steps to reproduce (requires a live instance)\n \n1. Ensure a target account exists in `inactive` or `manual_banned`/`sys_banned` status (e.g., an unconfirmed registration or a banned user).\n2. As any logged-in user:\n   ```\n   GET /api/v4/user/search?keyword=<>=2 chars of the target email/nick>\n   Cookie: cloudreve-session=<attacker-session>\n   ```\n3. Observe the inactive/banned account in the results, including its `email`.\n**Expected:** only active accounts appear (matching the method name and the sibling `GetActive*` behavior).\n**Actual:** inactive/banned accounts are returned with their email addresses.\n \n## Impact\n \nAny logged-in user can enumerate and harvest the email addresses (and basic profile metadata) of inactive and banned accounts that active-user lookups intentionally hide. No account access, passwords, or 2FA secrets are exposed; the impact is PII leakage and user enumeration.\n \n## Remediation\n \n- Add `Where(user.StatusEQ(user.StatusActive))` to `SearchActive` (matching `GetActiveByID`).\n- Apply the same active-status requirement to `GET /api/v4/user/info/:id`, or fall back to anonymous-level redaction unless the target account is active.\n- Consider not returning email from directory search at all — display name + hashed ID is usually sufficient.\n- Regression tests: searching a keyword that matches an inactive/banned account must return no result (or no email).",
  "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/cloudreve/Cloudreve/v4"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.0-20260613023921-7e1289d55279"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cloudreve/Cloudreve/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.0.0-20250225100611-da4e44b77af4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudreve/cloudreve/security/advisories/GHSA-8r7f-r8hj-r3rv"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudreve/cloudreve/commit/7e1289d552794bdbeb551be78456115c87dcb3da"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudreve/cloudreve"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudreve/cloudreve/releases/tag/4.17.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-359" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-24T20:46:49Z",
    "nvd_published_at" : null
  }
}