ZincSearch: Deleted Users Stay Authenticated Until Restart
Deleting a user removes the account from the store but not from the cache ZincSearch authenticates every request from; the credentials keep working until a restart.
Advisory ID: TP-2026-162
Product: ZincSearch (search engine for full-text and log data, an alternative to Elasticsearch)
Vulnerability type: Access not revoked after account deletion (CWE-613)
CVE: not requested
CVSS 3.1: 6.5 (Medium)
Affected versions: before 1.0.0-beta3 (verified live: 0.4.10)
Fixed in: 1.0.0-beta3
Reported: 8 June 2026
Summary
ZincSearch is a search engine for full-text and log data and authenticates every API request with HTTP Basic Auth. The credential check reads only from the in-memory cache ZINC_CACHED_USERS and never from the persistent store. DELETE /api/user/:id removes the account from the store but leaves the cache entry in place. The cache has no expiry and is rebuilt only when the process starts. Anyone who knows the credentials of a deleted account keeps its role and permissions until the operator restarts the process.
Root cause
VerifyCredentials fetches the user with ZINC_CACHED_USERS.Get(userID) (pkg/auth/auth.go:26, all line numbers as of commit 288ab73) and compares password, salt and role from the cache entry without consulting the store.
DeleteUser calls only metadata.User.Delete (pkg/auth/deleteuser.go:24-25) and does not remove the cache entry.
The method meant for this, cachedUsers.Delete(), exists (pkg/auth/cached_users.go:44) but has no caller.
The cache has neither an expiry nor a timer and is filled from the store only at startup (pkg/auth/firststart.go:52).
DeleteRole clears the permission cache ZINC_CACHED_PERMISSIONS before deleting (pkg/auth/role.go:117-121), and user deletion lacks that step.
Proof of Concept
curl -u admin:'Complexpass#123' -XPOST localhost:4080/api/user \
-d '{"_id":"victim","name":"victim","password":"Pw#123","role":"admin"}'
curl -u victim:'Pw#123' localhost:4080/api/user # HTTP 200
curl -u admin:'Complexpass#123' -XDELETE localhost:4080/api/user/victim
curl -u admin:'Complexpass#123' localhost:4080/api/user # victim absent
curl -u victim:'Pw#123' localhost:4080/api/user # HTTP 200
curl -u admin:'Complexpass#123' -XPOST localhost:4080/api/login \
-d '{"_id":"victim","password":"Pw#123"}' # {"validated":true,...}
After the deletion the user victim is missing from the user list, yet its credentials still return HTTP 200 and "validated":true. Verified on the 0.4.10 Docker image: a deleted account with the admin role created an index and a new administrator account after its deletion. Password changes, role changes and role deletion took effect immediately in the same test.
Impact
- Deleting an account does not revoke access; the credentials stay valid for the whole lifetime of the process.
- The deleted account keeps the permissions of its role, so with the
adminrole full control over indexes, documents and users. - A deleted administrator account creates new administrator accounts that are written to the store and survive a restart.
- Until the corrected version is installed, only a process restart ends the access.
References
Is Something Like This in Your Software?
Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.
