CVE-2024-22682
Code Injection vulnerability in duckdb (PyPI)

Code Injection No known exploit

What is CVE-2024-22682 About?

This vulnerability is a Code Injection in DuckDB <=0.9.2 and DuckDB extension-template <=0.9.2, allowing malicious extension injection. It can lead to arbitrary code execution or data manipulation. Exploitation is of moderate difficulty, requiring control over extension loading.

Affected Software

duckdb <0.9.3.dev6

Technical Details

The vulnerability lies in the custom extension feature of DuckDB and its extension-template, affecting versions up to 0.9.2. It allows for 'malicious extension injection.' This means that an attacker can introduce and load an extension that contains arbitrary malicious code. When DuckDB loads and executes this extension, the attacker's code will run within the context of the DuckDB process, potentially with the same privileges. The attack vector involves providing a crafted extension that is then loaded by DuckDB, bypassing any intended security checks that should prevent unauthorized or malicious code execution through this mechanism.

What is the Impact of CVE-2024-22682?

Successful exploitation may allow attackers to execute arbitrary code, manipulate data, compromise data integrity, or gain control over the database system.

What is the Exploitability of CVE-2024-22682?

Exploitation is of moderate complexity, typically requiring the attacker to have some control over what extensions are loaded into DuckDB or to convince a legitimate user or process to load a malicious extension. Authentication might be required to interact with the DuckDB instance or to deploy extensions, depending on the specific setup. Privilege requirements would align with those needed to manage or install database extensions. This can be a local or remote vulnerability depending on how DuckDB is exposed and how extensions are managed. The likelihood of exploitation increases in environments where extension sources are not rigorously validated or if untrusted parties can suggest or provide extensions.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2024-22682?

Available Upgrade Options

  • duckdb
    • <0.9.3.dev6 → Upgrade to 0.9.3.dev6

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2024-22682?

Similar Vulnerabilities: CVE-2021-29505 , CVE-2022-26134 , CVE-2023-38035 , CVE-2023-29402 , CVE-2023-50478