/

CVE-2026-56782

Severity:

CRITICAL RISK

(9.8)

Auth Bypass (CWE-306) in Gorse Dump/Restore APIs

CVE-2026-56782

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-306

Impact:

Unauthorized Access to Administrative Functions and Full Data Compromise

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gorse exposes an authentication bypass in the /api/dump and /api/restore endpoints when the admin_api_key configuration value is left empty, which is the default setting.

Under these conditions, remote attackers can access administrative backup and restore operations without credentials, enabling full data exfiltration or dataset overwrite over the network.

Affected context

This vulnerability occurs in Gorse deployments that rely on the default configuration where admin_api_key is unset or empty.

In this state, the /api/dump and /api/restore endpoints effectively operate without access control, exposing backup and restore operations to any remote client able to reach the API.

The risk is most significant in internet-exposed or widely reachable instances that store user profiles, items, and feedback data.

Exploit preconditions

  • Attack surface: HTTP API endpoints /api/dump and /api/restore
  • Required access: Network reachability to the Gorse service; no valid credentials required when admin_api_key is empty
  • Trigger point: Invocation of dump or restore operations via the exposed endpoints
  • Why exploitation is possible: Administrative API functions are not protected when the admin key is empty, violating expected authorization checks (CWE-306)

Why this happens

The underlying issue is a missing or ineffective enforcement of authorization on administrative endpoints when the admin_api_key is empty.

Instead of treating an empty key as an invalid configuration and denying access, the system allows requests to proceed without verifying caller identity.

This maps to CWE-306: Missing Authentication for Critical Function, where sensitive operations (such as database backup and restore) are exposed without proper access control.

Potential impact

  • Remote attackers may dump and exfiltrate the entire recommendation database.
  • User records, item metadata, and feedback entries containing personally identifiable information can be disclosed.
  • Attackers could overwrite or restore arbitrary datasets, corrupting production data.
  • Recommendation quality and integrity can be sabotaged, potentially impacting downstream applications and analytics.
  • Unauthorized parties can gain deep insight into user behavior and system configuration.

General mitigation guidance

Effective mitigation focuses on enforcing strong, non-empty administrative authentication and limiting exposure of sensitive endpoints.

Recommended defensive patterns include:

  • Treating empty or default administrative keys as invalid and refusing to start or serve admin APIs in that state.
  • Requiring explicit configuration of an admin API key with sufficient entropy and rotating it periodically.
  • Segregating administrative endpoints behind internal networks, VPNs, or dedicated management interfaces rather than public exposure.
  • Applying least-privilege principles by ensuring routine clients cannot invoke dump/restore functions.
  • Implementing centralized access control and policy checks for all critical operations, regardless of configuration defaults.

How teams detect issues like this

Detection can rely on both configuration review and behavioral monitoring.

Common approaches include:

  • Static configuration audits to flag deployments where admin_api_key is missing, empty, or set to weak values.
  • Infrastructure-as-code and policy enforcement (e.g., CI/CD checks) that prevent deploying instances with unconfigured admin credentials.
  • Application logs and API gateway monitoring to identify dump/restore requests from unexpected sources or without proper authentication metadata.
  • Periodic penetration testing and automated API scans to verify that administrative endpoints require valid credentials.

Sources

SourceLink
github.comgithub.com/gorse-io/gorse/commit/19fdcbb309fb5b609e9cc3eb10c74885b5b27da9
github.comgithub.com/gorse-io/gorse/issues/1292
github.comgithub.com/gorse-io/gorse/pull/1293
vulncheck.comvulncheck.com/advisories/gorse-unauthenticated-database-dump-and-restore-via-api-dump-and-api-restore-endpoints

Frequently asked

questions

Yes. If the Gorse instance is reachable over the network and admin_api_key is empty, attackers can remotely invoke dump and restore operations without any credentials.

Only network access to the affected Gorse API endpoints is required. No authenticated user account or administrative login is needed when the admin key is not set.

Ensure that administrative endpoints always enforce strong authentication, treat empty or default keys as invalid, and restrict access to management APIs to trusted networks or dedicated admin channels.

Adopt secure-by-default configurations, enforce mandatory authentication for critical functions, add configuration validation that blocks unsafe deployments, and integrate access-control checks into code review and automated security testing pipelines.

Find out what's already
exploitable in your codebase.