---
id: CVE-2026-39946
aliases:
  - GHSA-6vgr-cp5c-ffx3
  - BIT-openbao-2026-39946
  - GO-2026-5192
title: OpenBao's SQL Injection in PostgreSQL database secrets engine
summary: OpenBao's SQL Injection in PostgreSQL database secrets engine
severity: medium
cvss: 4.9
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N'
vendor: openbao
product: github.com/openbao/openbao
ecosystem: go
affected:
  - github.com/openbao/openbao < 0.0.0-20260420155735-b596b0882620
patched:
  - github.com/openbao/openbao 0.0.0-20260420155735-b596b0882620
published: '2026-04-21'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:43.379176192Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-6vgr-cp5c-ffx3'
references:
  - url: 'https://github.com/openbao/openbao/security/advisories/GHSA-6vgr-cp5c-ffx3'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-39946'
  - url: 'https://github.com/openbao/openbao/pull/2931'
  - url: >-
      https://github.com/openbao/openbao/commit/80693a46ebb4fc2455f1c51ed1dd853b28c2fd77
  - url: 'https://github.com/openbao/openbao'
  - url: 'https://github.com/openbao/openbao/releases/tag/v2.5.3'
tags:
  - osv
  - go
epss: 0.00391
epssPercentile: 0.30508
ingestedAt: '2026-07-27T19:08:54.118Z'
---

## Overview

### Impact

When OpenBao revoked privileges on a role in the PostgreSQL database secrets engine, OpenBao failed to use proper database quoting on schema names provided by PostgreSQL. This could lead to role revocation failures, or more rarely, SQL injection as the management user.

This vulnerability was originally from HashiCorp Vault.

### Patches

This was addressed in v2.5.3.

### Workarounds

Audit table schemas and ensure database users cannot create new schemas and grant privileges on them.

## Affected packages

- `github.com/openbao/openbao < 0.0.0-20260420155735-b596b0882620`

## Remediation

Upgrade to a patched release:

- `github.com/openbao/openbao 0.0.0-20260420155735-b596b0882620`
