Bug #15856
closed
OpenVPN Status Page and Dashboard Widget use input values without validation
Added by Jim Pingle 10 months ago.
Updated 3 months ago.
Plus Target Version:
25.07
Description
When performing operations using the OpenVPN status page (/status_openvpn.php
) or the Dashboard widget (/widgets/widgets/openvpn.widget.php
), user input from the remipp
variable is sent to the OpenVPN management socket without validation. By manipulating the content of this variable it is possible to send additional arbitrary OpenVPN management commands through the management socket.
Output from the OpenVPN management commands is not returned to the user, but the commands can perform actions such as changing the log verboseness or causing the daemon to exit, resulting in a denial of service. Changes made using these commands do not persist across restarts of a OpenVPN daemons.
Values involved in these commands should be checked for proper form and rejected if they do not match the expected format. It may also be beneficial to strip newlines or other control characters from values being sent to the management socket.
Files
Attaching a small POC Python script. Edit and adjust the URL, and credentials, target page, and port to match the setup being tested. It executes a command to terminate the daemon, which is easily confirmed by checking the service status after running the script.
- Status changed from New to Feedback
- % Done changed from 0 to 100
I merged the changes, they are ready for additional testing.
- Plus Target Version changed from 25.01 to 25.03
Fix working, tested on 24.03
Before fix:
prokleon@pfctl:~$ sudo python3 py.script
|server7|5
signal SIGTERM|-1|
After:
prokleon@pfctl:~$ sudo python3 py.script
invalid input
I'm still waiting to hear back from the original reporter to see if it fixed it for them, too, so keeping this open yet.
- Status changed from Feedback to Resolved
Original reporter responded back that the last round of fixes corrected the problem, so this can be closed now.
- Private changed from Yes to No
- Plus Target Version changed from 25.03 to 25.07
Also available in: Atom
PDF