CVE-2022-27816: Data Loss/Denial of Service in SWHKD
7.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.31794%
CWE
Published
3/31/2022
Updated
1/27/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
Simple-Wayland-HotKey-Daemon | rust | < 1.2.0 | 1.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems directly from the hardcoded /tmp/swhks.pid
path in src/server.rs
shown in the commit diff. This violates CWE-59 by using a predictable temporary file path without proper safety checks, making it susceptible to symlink attacks. The patch moves the path to a user-specific /run/user/
directory, confirming this was the vulnerable code path. While no named functions are explicitly mentioned in the report, the main function's PID file handling is the root cause.