Executive brief
osquery is a tool used by security and IT teams to monitor and analyze the health and security of operating systems. A vulnerability in its 'file carving' feature—which collects files for forensic analysis—could allow a low-privileged user on the same system to view sensitive data while it is being processed. This could lead to the exposure of confidential system files or user data that the attacker would otherwise not have permission to see.
Technical details
A vulnerability exists in osquery's file carving mechanism due to incorrect permission assignment (CWE-279) on temporary directories. When osquery 'carves' (collects) files, it creates a temporary directory to store the data before exfiltration; however, these directories were not created with private permissions, making them world-readable. A local, unprivileged attacker can monitor the temporary directory path and read the contents of the carved files before they are deleted upon completion. If an attacker can influence the target of a carve (e.g., a directory they control), they can leverage this to read arbitrary sensitive files like /etc/shadow. The issue is fixed in version 5.23.1 by ensuring carve directories are created with private permissions.
Affected products
- osquery osquery < 5.23.1
Timeline
- 2026-06-17: other: Pull request submitted to fix the issue
- 2026-06-24: patched: Version 5.23.1 released
- 2026-07-01: advisory: GitHub Security Advisory published
- 2026-07-10: disclosed: CVE published to NVD