CVE-2026-58139

DuckDB AWS Extension Security Policy Bypass via load_aws_credentials Procedure

Published Aug 3, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
Description
The DuckDB AWS extension for DuckDB contains a security policy bypass vulnerability that allows any database user with SQL execution permissions to extract plaintext AWS credentials by calling the load_aws_credentials function with the redact_secret parameter set to false, circumventing the database-wide allow_unredacted_secrets=false policy. Attackers can invoke this single function to retrieve the underlying AWS credential chain including access_key_id, secret_access_key, session_token, and region in plaintext, which are immediately valid against AWS APIs and particularly impactful in managed environments where pg_duckdb is preloaded and an AWS credential chain such as IMDSv2, IRSA, ECS task role, or EC2 instance role is reachable.

Analysis

AI-generated

Technical impact

The vulnerability allows a database user with SQL execution permissions to call the load_aws_credentials function with redact_secret disabled, bypassing the database‑wide allow_unredacted_secrets policy and retrieving the full AWS credential chain in plain text. This exposes the access_key_id, secret_access_key, session_token, and region, which can immediately be used to authenticate to AWS services. The weakness is an authorization flaw (CWE‑863).

Affected Systems

Vendors and product: DuckDB’s AWS extension (duckdb:duckdb‑aws). Affected systems are any DuckDB installations that have the AWS extension loaded and a working AWS credential chain such as IMDSv2, IRSA, ECS task role or EC2 instance role. The issue applies to any instance where the database user has SQL execution rights and the allow_unredacted_secrets policy is set to false.

Risk and Exploitability

The CVSS score of 6.0 indicates a moderate risk. The EPSS score <1% shows that exploitation is considered unlikely, and the vulnerability is not listed in the CISA KEV catalog. Attackers only need database‑level SQL execution rights, making the attack vector local to the database environment. Once credentials are extracted, the attacker can immediately use them to authenticate with AWS services and potentially compromise the underlying infrastructure.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Modify the DuckDB AWS extension configuration to enforce redact_secret=true by default or restrict the load_aws_credentials function to trusted roles.
  • Restrict database user roles so that only privileged users can execute load_aws_credentials and enforce the allow_unredacted_secrets policy.
  • Monitor database logs for calls to load_aws_credentials and disable the function if it is not required.
  • Apply any available vendor updates to the DuckDB AWS extension once released.

Generated by OpenCVE AI on August 4, 2026 at 21:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:duckdb:duckdb:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Duckdb
Duckdb duckdb
Vendors & Products Duckdb
Duckdb duckdb
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The DuckDB AWS extension for DuckDB contains a security policy bypass vulnerability that allows any database user with SQL execution permissions to extract plaintext AWS credentials by calling the load_aws_credentials function with the redact_secret parameter set to false, circumventing the database-wide allow_unredacted_secrets=false policy. Attackers can invoke this single function to retrieve the underlying AWS credential chain including access_key_id, secret_access_key, session_token, and region in plaintext, which are immediately valid against AWS APIs and particularly impactful in managed environments where pg_duckdb is preloaded and an AWS credential chain such as IMDSv2, IRSA, ECS task role, or EC2 instance role is reachable.
Title DuckDB AWS Extension Security Policy Bypass via load_aws_credentials Procedure
Weaknesses CWE-863
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:06 PM
Reserved
Jun 29, 2026, 2:13 PM
Status
Deferred
Published
Aug 3, 2026, 8:17 PM
Modified
Oct 23, 2026, 9:10 PM