Summary
sniffcsv provides filesystem access even when enableexternal_access is disabled in duckdb
Content in filesystem is accessible for reading using sniff_csv, even with enable_external_access=false.
Details
During a pentest, a security researcher was able to access environment variable data and other system data by using the sniff_csv function, even though we set enable_external_access to false.
PoC
SET enable_external_access=false;
SET lock_configuration=true;
SELECT Columns FROM sniff_csv('/proc/self/environ');
Workaround
It is possible to work around the issue by disabling the local file system using the disabled_filesystems setting:
SET disabled_filesystems='LocalFileSystem';
SET lock_configuration=true;
SELECT Columns FROM sniff_csv('/proc/self/environ');
will result in Permission Error: File system LocalFileSystem has been disabled by configuration.
Impact
Provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access.
For example select * from read_csv('/proc/self/environ') fails with a permission error.
There seems to be two vectors to this vulnerability:
- Access to files that should otherwise not be allowed. (We expect
Permission Error: Scanning CSV files is disabled through configurationand not to provide any access to the file or even acknowledge that it exists). - The content from a (non-csv?) file can be read (e.g.
/etc/hosts,proc/self/environ, etc) even though that doesn't seem to be the intent of the sniff_csv function (my understanding is it's intending to provide information about the shape of the data, but not provide the data itself).
CVE-2024-41672 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.1.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
A fix has been merged into the main branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.
Frequently Asked Questions
- What is CVE-2024-41672? CVE-2024-41672 is a high-severity security vulnerability in duckdb (pip), affecting versions >= 1.0.0, < 1.1.0. It is fixed in 1.1.0.
- How severe is CVE-2024-41672? CVE-2024-41672 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of duckdb are affected by CVE-2024-41672? duckdb (pip) versions >= 1.0.0, < 1.1.0 is affected.
- Is there a fix for CVE-2024-41672? Yes. CVE-2024-41672 is fixed in 1.1.0. Upgrade to this version or later.
- Is CVE-2024-41672 exploitable, and should I be worried? Whether CVE-2024-41672 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-41672 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-41672? Upgrade
duckdbto 1.1.0 or later.