CVE-2020-26273
sqlite ATTACH allows some filesystem access
Check your servers for CVE-2020-26273
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2020-26273 affects osquery, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
osquery is a SQL powered operating system instrumentation, monitoring, and analytics framework. In osquery before version 4.6.0, by using sqlite's ATTACH verb, someone with administrative access to osquery can cause reads and writes to arbitrary sqlite databases on disk. This _does_ allow arbitrary files to be created, but they will be sqlite databases. It does not appear to allow existing non-sqlite files to be overwritten. This has been patched in osquery 4.6.0. There are several mitigating factors and possible workarounds. In some deployments, the people with access to these interfaces may be considered administrators. In some deployments, configuration is managed by a central tool. This tool can filter for the `ATTACH` keyword. osquery can be run as non-root user. Because this also limits the desired access levels, this requires deployment specific testing and configuration.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality low, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.95%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 62.4% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-77 Improper Neutralization of Special Elements used in a Command
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of osquery and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i osquery
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2020-26273 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2020-26273RHEL, Rocky, Alma, Fedora
rpm -q osquery
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2020-26273Alpine
apk list --installed | grep -i osqueryWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2020-26273
trivy image --scanners vuln IMAGE | grep CVE-2020-26273
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/SQL%20Injection/SQLite%20Injection.md#remote-command-execution-using-sqlite-command---load_extension github.com
- https://github.com/osquery/osquery/commit/c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c github.com
- https://github.com/osquery/osquery/releases/tag/4.6.0 github.com
Source: the record CVE-2020-26273 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse