CVE & CISA-KEV Catalog

CVE-2023-36830

MEDIUM
6.3
CVSS v3
NVD

Description

SQLFluff is a SQL linter. Prior to version 2.1.2, in environments where untrusted users have access to the config files, there is a potential security vulnerability where those users could use the `library_path` config value to allow arbitrary python code to be executed via macros. For many users who use SQLFluff in the context of an environment where all users already have fairly escalated privileges, this may not be an issue - however in larger user bases, or where SQLFluff is bundled into another tool where developers still wish to give users access to supply their on rule configuration, this may be an issue. The 2.1.2 release offers the ability for the `library_path` argument to be overwritten on the command line by using the `--library-path` option. This overrides any values provided in the config files and effectively prevents this route of attack for users which have access to the config file, but not to the scripts which call the SQLFluff CLI directly. A similar option is provided for the Python API, where users also have a greater ability to further customise or override configuration as necessary. Unless `library_path` is explicitly required, SQLFluff maintainers recommend using the option `--library-path none` when invoking SQLFluff which will disable the `library-path` option entirely regardless of the options set in the configuration file or via inline config directives. As a workaround, limiting access to - or otherwise validating configuration files before they are ingested by SQLFluff will provides a similar effect and does not require upgrade.

How to fix

Remediation Available
sqlfluffDebian
Fixed in:2.3.5-1CVE-2023-36830
Fixed in:2.3.5-1CVE-2023-36830

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeChanged

Impact

ConfidentialityLow
IntegrityLow
AvailabilityLow

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

Exploit Intelligence

0.39%probability of exploitation in 30 days
31stpercentile

Low risk: more likely to be exploited than 31% of all known CVEs.

References

Exploit1
Release Notes1

Related Vulnerabilities

Other CWE-74 (Injection) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2013-2251Critical9.8100%KEVFix
CVE-2023-22527Critical9.8100%KEV + RansomFix
CVE-2019-2725Critical9.8100%KEV + RansomFix
CVE-2022-46169Critical9.8100%KEVFix
CVE-2022-35914Critical9.8100%KEV-
CVE-2019-17558High7.599%KEVFix
Embed a live status badge for CVE-2023-36830
CVE-2023-36830 severity badge

Markdown

[![CVE-2023-36830](https://tridentstack.com/cve/badge/CVE-2023-36830.svg)](https://tridentstack.com/cve/CVE-2023-36830)

HTML

<a href="https://tridentstack.com/cve/CVE-2023-36830"><img src="https://tridentstack.com/cve/badge/CVE-2023-36830.svg" alt="CVE-2023-36830"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.