{"id":"CVE-2024-41672","aliases":["EUVD-2024-0052","GHSA-w2gf-jxc9-pf2q","JLSEC-2026-774","PYSEC-2024-203"],"status":"published","title":"DuckDB: sniff_csv provides filesystem access even when enable_external_access is disabled","description":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a 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. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00813,"percentile":0.57442,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-200"],"published":"2024-07-24T17:47:20Z","modified":"2026-10-28T02:30:57Z","fixes":[{"ecosystem":"PyPI","package":"duckdb","fixed_in":["1.1.0"],"sources":["ghsa","osv"]},{"ecosystem":"Julia","package":"DuckDB_jll","fixed_in":["1.1.0+0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"duckdb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0"},{"fixed":"1.1.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"duckdb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0"},{"fixed":"1.1.0"}]}],"versions":["1.0.0"]},{"source":"osv","ecosystem":"Julia","package":"DuckDB_jll","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.0+0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"duckdb","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.0"}]}],"versions":["0.0.0","0.0.2","0.0.3","0.1.0","0.1.1","0.1.2","0.1.3","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.10.0","0.10.1","0.10.2","0.10.3","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.4.0","0.5.0","0.5.1","0.6.0","0.6.1","0.7.0","0.7.1","0.8.0","0.8.1","0.9.0","0.9.1","0.9.2","1.0.0","v0.10.3","v0.10.2","v0.10.1","v0.10.0","v0.9.2","v0.9.1","v0.9.0","v0.8.1","v0.8.0","v0.7.1","v0.7.0","v0.6.1","v0.6.0","v0.5.1","v0.5.0","v0.4.0","v0.3.4","v0.3.3","v0.3.2","v0.3.1","v0.3.0","v0.2.9","v0.2.8","v0.2.7","v0.2.6","v0.2.5","v0.2.4","v0.2.3","v0.2.2","v0.2.1","v0.2.0","v0.1.9","v0.1.8","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.1"]}],"products":[{"vendor":"duckdb","product":"duckdb"}],"references":[{"url":"https://github.com/duckdb/duckdb/security/advisories/GHSA-w2gf-jxc9-pf2q","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web","evidence"]},{"url":"https://github.com/duckdb/duckdb/pull/13133","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/duckdb/duckdb/commit/c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41672","tags":["advisory","web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/duckdb/PYSEC-2024-203.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-w2gf-jxc9-pf2q","tags":["web","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/41xxx/CVE-2024-41672.json","tags":["advisory"]},{"url":"https://github.com/duckdb/duckdb","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-41672","title":"DuckDB: sniff_csv provides filesystem access even when enable_external_access is disabled","description":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a 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. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","status":"published","published":"2024-07-24T17:47:20.626Z","modified":"2024-08-02T04:46:52.916Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:34:04.00829Z"}],"euvd":[{"id":"EUVD-2024-0052","description":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a 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. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","status":"published","published":"2024-07-24T17:47:20Z","modified":"2024-08-02T04:46:52Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-03T03:50:16.930013Z"}],"ghsa":[{"id":"GHSA-w2gf-jxc9-pf2q","title":"sniff_csv provides filesystem access even when enable_external_access is disabled in duckdb","description":"### Summary\nContent in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. \n\n### Details\nDuring 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. \n\n### PoC\n```SQL\nSET enable_external_access=false;\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\n### Impact\nProvides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. \n\nFor example `select * from read_csv('/proc/self/environ')` fails with a permission error. \n\nThere seems to be two vectors to this vulnerability: \n1. Access to files that should otherwise not be allowed. (We expect `Permission Error: Scanning CSV files is disabled through configuration` and not to provide any access to the file or even acknowledge that it exists). \n2. 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). \n\n### Workaround\nIt is possible to work around the issue by disabling the local file system using the `disabled_filesystems` setting:\n```SQL\nSET disabled_filesystems='LocalFileSystem';\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\nwill result in `Permission Error: File system LocalFileSystem has been disabled by configuration`.\n\n### Fix\nA fix has been merged into the `main` branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.\n\n","status":"published","published":"2025-01-21T21:07:56Z","modified":"2025-01-21T21:07:56Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:38:27.974809Z"}],"nvd":[{"id":"CVE-2024-41672","description":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a 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. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","status":"published","published":"2024-07-24T18:15:05.527Z","modified":"2026-06-17T07:48:01.323Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:10:14.437386Z"}],"osv":[{"id":"CVE-2024-41672","title":"DuckDB: sniff_csv provides filesystem access even when enable_external_access is disabled","description":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a 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. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","status":"published","published":"2024-07-24T17:47:20.626Z","modified":"2026-10-28T02:30:57.828046177Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:44:41.963899Z"},{"id":"GHSA-w2gf-jxc9-pf2q","title":"sniff_csv provides filesystem access even when enable_external_access is disabled in duckdb","description":"### Summary\nContent in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. \n\n### Details\nDuring 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. \n\n### PoC\n```SQL\nSET enable_external_access=false;\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\n### Impact\nProvides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. \n\nFor example `select * from read_csv('/proc/self/environ')` fails with a permission error. \n\nThere seems to be two vectors to this vulnerability: \n1. Access to files that should otherwise not be allowed. (We expect `Permission Error: Scanning CSV files is disabled through configuration` and not to provide any access to the file or even acknowledge that it exists). \n2. 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). \n\n### Workaround\nIt is possible to work around the issue by disabling the local file system using the `disabled_filesystems` setting:\n```SQL\nSET disabled_filesystems='LocalFileSystem';\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\nwill result in `Permission Error: File system LocalFileSystem has been disabled by configuration`.\n\n### Fix\nA fix has been merged into the `main` branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.\n\n","status":"published","published":"2025-01-21T21:07:56Z","modified":"2026-06-10T17:14:18.58733118Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:46:58.04805Z"},{"id":"JLSEC-2026-774","title":"`sniff_csv` provides filesystem access even when `enable_external_access` is disabled in duckdb","description":"### Summary\n\nContent in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`.\n\n### Details\n\nDuring 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.\n\n### PoC\n\n```SQL\nSET enable_external_access=false;\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\n### Impact\n\nProvides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access.\n\nFor example `select * from read_csv('/proc/self/environ')` fails with a permission error.\n\nThere seems to be two vectors to this vulnerability:\n\n 1. Access to files that should otherwise not be allowed. (We expect `Permission Error: Scanning CSV files is disabled through configuration` and not to provide any access to the file or even acknowledge that it exists).\n 2. 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).\n\n### Workaround\n\nIt is possible to work around the issue by disabling the local file system using the `disabled_filesystems` setting:\n\n```SQL\nSET disabled_filesystems='LocalFileSystem';\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\nwill result in `Permission Error: File system LocalFileSystem has been disabled by configuration`.\n\n### Fix\n\nA fix has been merged into the `main` branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.","status":"published","published":"2026-07-20T14:13:17.389Z","modified":"2026-07-25T18:24:54.205064529Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:47:19.003546Z"},{"id":"PYSEC-2024-203","description":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a 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. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","status":"published","published":"2024-07-24T18:15:05Z","modified":"2026-06-10T17:14:16.437007253Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:52:54.242332Z"}]}}
