# CVE-2026-39946: OpenBao's SQL Injection in PostgreSQL database secrets engine

Source: https://junglewise.ai/threats/cve-2026-39946-openbao-s-sql-injection-in-postgresql-database-secrets-engine  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-21. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2026-39946 · Severity: medium · CVSS 4.9 · Published 2026-04-21

OpenBao is an open source identity-based secrets management system. Prior to version 2.5.3, 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 original from HashiCorp Vault. The vulnerability is addressed in v2.5.3. As a workaround, audit table schemas and ensure database users cannot create new schemas and grant privileges on them.

Technologies: [github.com/openbao/openbao (Go)](https://junglewise.ai/threats/technologies/github-com-openbao-openbao), [OpenBao](https://junglewise.ai/threats/technologies/openbao). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [OpenBao](https://junglewise.ai/threats/vendors/openbao).

## Quick answers

**Is CVE-2026-39946 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-39946 being exploited in the wild.

**How severe is CVE-2026-39946?** Medium severity, with a CVSS score of 4.9, published 21 April 2026.

**Which products and versions are affected?** github.com/openbao/openbao (Go) < 0.0.0-20260420155735-b596b0882620, SEMVER:introduced=0,fixed=0.0.0-20260420155735-b596b0882620.

**Is there a fix for CVE-2026-39946?** Yes. github.com/openbao/openbao (Go): upgrade to 0.0.0-20260420155735-b596b0882620 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-39946?** Check whether you run github.com/openbao/openbao (Go) or OpenBao at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/openbao/openbao (Go): upgrade to 0.0.0-20260420155735-b596b0882620 or later

  ```sh
  go get github.com/openbao/openbao@v0.0.0-20260420155735-b596b0882620
  ```


## Affected products

- github.com/openbao/openbao (Go) < 0.0.0-20260420155735-b596b0882620, SEMVER:introduced=0,fixed=0.0.0-20260420155735-b596b0882620
- OpenBao

## Identifiers

- CVE-2026-39946
- GHSA-6vgr-cp5c-ffx3
- GO-2026-5192

## References

- [https://api.github.com/users/jmecom](https://api.github.com/users/jmecom)
- [https://github.com/jmecom](https://github.com/jmecom)
- [https://api.github.com/users/jmecom/gists%7B/gist_id%7D](https://api.github.com/users/jmecom/gists%7B/gist_id%7D)
- [https://api.github.com/users/jmecom/repos](https://api.github.com/users/jmecom/repos)
- [https://avatars.githubusercontent.com/u/6612870?v=4](https://avatars.githubusercontent.com/u/6612870?v=4)
- [https://api.github.com/users/jmecom/events%7B/privacy%7D](https://api.github.com/users/jmecom/events%7B/privacy%7D)

## Related threats

- [OpenBao policy cache incorrect authorization via namespace traversal](https://junglewise.ai/threats/cve-2026-115365-openbao-from-2-3-0-before-2-6-3-contains-an-incorrect)
- [OpenBao ACL bypass in policy denial evaluation](https://junglewise.ai/threats/cve-2026-115361-openbao-before-2-6-3-contains-an-acl-bypass-vulnerability-that)
- [OpenBao Kubernetes Auth token renewal on revoked credentials](https://junglewise.ai/threats/cve-2026-115356-openbao-before-2-6-4-and-2-7-x-before-2-7-1-does-not-verify-when)
- [OpenBao Agent information disclosure via stdout in exec rendering mode](https://junglewise.ai/threats/cve-2026-77285-openbao-agent-information-disclosure-via-stdout-in-exec-rendering)
- [OpenBao recovery mode timing attack token leakage](https://junglewise.ai/threats/cve-2026-63132-openbao-recovery-mode-timing-attack-token-leakage)
