Project

General

Profile

Actions

Bug #16743

closed

``isvalidpid()`` function does not properly check or escape PID file parameter

Added by Jim Pingle 23 days ago. Updated 2 days ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Services
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
26.03
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

The isvalidpid() function takes a $pidfile parameter and executes a shell command using that parameter without checking if the file exists first or escaping the file before execution.

As a consequence, it is possible in certain circumstances for an authenticated user to pass parameters to the function resulting in command execution.

A specific example is stopping an OpenVPN service via status_services.php. The code that handles stopping the service uses the id parameter when forming a PID file path, and since that value is not fully validated, a malicious value can trigger command execution.

Users must be authenticated and have privileges to access status_services.php to trigger the issue in that manner.

Simple POC attached.


Files

poc-isvalidpid-exec.py (1.16 KB) poc-isvalidpid-exec.py Jim Pingle, 03/11/2026 06:27 PM
Actions

Also available in: Atom PDF