Arbitrary Python execution via library_path imports
Published Jul 6, 2023 · Updated Oct 18, 2024
Code injection in SQLFluff before 2.1.2 allows local users to execute arbitrary Python through attacker-controlled configuration. The Jinja templater imports modules named by the library_path setting and exposes them to macros, letting a crafted .sqlfluff file reach Python APIs outside the sandbox. Exploitation requires control of configuration or inline directives that a more privileged process later loads.
Summary
What happened
Code injection in SQLFluff before 2.1.2 allows local users to execute arbitrary Python through attacker-controlled configuration. The Jinja templater imports modules named by the library_path setting and exposes them to macros, letting a crafted .sqlfluff file reach Python APIs outside the sandbox. Exploitation requires control of configuration or inline directives that a more privileged process later loads.
The record
- CVE
- CVE-2023-36830
- Published
- Jul 6, 2023
- Updated
- Oct 18, 2024
- Vendor
- SQLFluff
- Product
- SQLFluff
- Classifications
- CWE-74, T1059.006
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Jul 6, 2023CVE publishedPublication date reported by the CVE source.
- Oct 18, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 2.1.2
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- library_path Jinja macro proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo