Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dbgate
  4. ›
  5. CVE-2026-47669

CVE-2026-47669: DbGate: Zip Slip in archive/unzip allows arbitrary file write leading to RCE

June 5, 2026

The unzipDirectory() function in packages/api/src/shell/unzipDirectory.js (line 27) does not validate that extracted file paths stay within the output directory. A malicious ZIP with ../ entries writes files anywhere on the filesystem.

In the default Docker deployment, DbGate runs as root and the none auth provider issues JWT tokens without credentials via POST /auth/login, so this is exploitable by any network-adjacent attacker.

Affected code:

packages/api/src/shell/unzipDirectory.js, line 27:

const destPath = path.join(outputDirectory, entry.fileName);
// No check that destPath stays within outputDirectory

Called from packages/api/src/controllers/archive.js, lines 291-293:

async unzip({ folder }) {
const newFolder = await this.getNewArchiveFolder({ database: folder.slice(0, -4) });
await unzipDirectory(path.join(archivedir(), folder), path.join(archivedir(), newFolder));

The archive controller also has zero permission checks and zero path traversal protection on any of its endpoints.

PoC:

import requests, zipfile, io

TARGET = "http://localhost:3000"

References

  • github.com/advisories/GHSA-h535-j5hr-mv56
  • github.com/dbgate/dbgate/releases/tag/v7.1.9
  • github.com/dbgate/dbgate/security/advisories/GHSA-h535-j5hr-mv56
  • nvd.nist.gov/vuln/detail/CVE-2026-47669

Code Behaviors & Features

Detect and mitigate CVE-2026-47669 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 7.1.9

Fixed versions

  • 7.1.9

Solution

Upgrade to version 7.1.9 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

npm/dbgate/CVE-2026-47669.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:41 +0000.