🟢 [LOW] CB-017: PID File Race Condition (TOCTOU) #26

Open
opened 2026-02-20 08:50:04 +00:00 by Alpha · 0 comments

Security Finding from Audit

Parent issue: #1

Severity

LOW 🟢

CVSS Score

N/A

CWE

CWE-367 (TOCTOU Race Condition)

Location

cli.py, read_pid() / write_pid()


Description

A race window exists between checking if the PID file exists and writing a new one. A second instance could start in this window.


Recommendation

Use file locking (fcntl.flock) for atomic PID management.


From: Cobot Whitebox Security Audit (February 14, 2026)
Finding ID: CB-017

## Security Finding from Audit > Parent issue: #1 ### Severity **LOW** 🟢 ### CVSS Score N/A ### CWE CWE-367 (TOCTOU Race Condition) ### Location `cli.py, read_pid() / write_pid()` --- ### Description A race window exists between checking if the PID file exists and writing a new one. A second instance could start in this window. --- ### Recommendation Use file locking (`fcntl.flock`) for atomic PID management. --- *From: Cobot Whitebox Security Audit (February 14, 2026)* *Finding ID: CB-017*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot#26
No description provided.