CVE-2026-39946: Github.com/openbao/openbao SQL Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-6vgr-cp5c-ffx3
CVSS 4.9
CWE-89
Published
Advisory Summary

CVE-2026-39946 is a MODERATE (CVSS 4.9) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Github.com/openbao/openbao libraries in the Go ecosystem. The issue involves openbao's sql injection in postgresql database secrets engine. Remediation is available by upgrading affected packages to version 0.0.0-20260420155735-b596b0882620.

CVE-2026-39946 at a Glance

CVE Identifier CVE-2026-39946
GHSA Identifier GHSA-6vgr-cp5c-ffx3
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Github.com/openbao/openbao
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-39946

To remediate this vulnerability, upgrade all affected Github.com/openbao/openbao dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/openbao/openbao fixed: 0.0.0-20260420155735-b596b0882620
Upgrade github.com/openbao/openbao to 0.0.0-20260420155735-b596b0882620
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/openbao/openbao

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-39946, inspect your project dependencies for Github.com/openbao/openbao:

inspect dependencies for github.com/openbao/openbao

Analyze the terminal output to locate any version of Github.com/openbao/openbao in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260420155735-b596b0882620), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Github.com/openbao/openbao, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-39946 Affected Github.com/openbao/openbao Versions

1 component(s)
Fixed Versions:
0.0.0-20260420155735-b596b0882620
Product / Package Ecosystem Affected Versions Fixed Version
github.com/openbao/openbao
Go
< 0.0.0-20260420155735-b596b0882620
0.0.0-20260420155735-b596b0882620

References

Frequently Asked Questions

What is CVE-2026-39946?
CVE-2026-39946 is a security vulnerability in Github.com/openbao/openbao involving OpenBao's SQL Injection in PostgreSQL database secrets engine under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Github.com/openbao/openbao versions are affected?
Affected versions include releases prior to 0.0.0-20260420155735-b596b0882620 across affected packages: github.com/openbao/openbao.
What version fixes CVE-2026-39946?
Upgrading to 0.0.0-20260420155735-b596b0882620 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/openbao/openbao affected?
Yes, github.com/openbao/openbao is affected in releases prior to 0.0.0-20260420155735-b596b0882620. Upgrade your dependency to 0.0.0-20260420155735-b596b0882620 or later.
What is the CVSS score of CVE-2026-39946?
CVE-2026-39946 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-39946?
CVE-2026-39946 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Go dependencies for CVE-2026-39946?
Run the dependency tree command: 'inspect dependencies for github.com/openbao/openbao'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6vgr-cp5c-ffx3",
  "modified" : "2026-04-27T16:36:02Z",
  "published" : "2026-04-21T18:26:05Z",
  "aliases" : [ "CVE-2026-39946" ],
  "summary" : "OpenBao's SQL Injection in PostgreSQL database secrets engine",
  "details" : "### Impact\n\nWhen 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.\n\nThis vulnerability was originally from HashiCorp Vault.\n\n### Patches\n\nThis was addressed in v2.5.3.\n\n### Workarounds\n\nAudit table schemas and ensure database users cannot create new schemas and grant privileges on them.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/openbao/openbao"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260420155735-b596b0882620"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openbao/openbao/security/advisories/GHSA-6vgr-cp5c-ffx3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39946"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openbao/openbao/pull/2931"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openbao/openbao/commit/80693a46ebb4fc2455f1c51ed1dd853b28c2fd77"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openbao/openbao"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openbao/openbao/releases/tag/v2.5.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-21T18:26:05Z",
    "nvd_published_at" : "2026-04-21T01:16:06Z"
  }
}