Project

General

Profile

Actions

Bug #17056

closed
JP JP

Authenticated Command Execution via ``xmlrpc.php`` remote authentication privilege check

Bug #17056: Authenticated Command Execution via ``xmlrpc.php`` remote authentication privilege check

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

Status:
Resolved
Priority:
Very High
Assignee:
Category:
XMLRPC
Target version:
Start date:
Due date:
% Done:

100%

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

Description

If pfSense software is configured to perform remote authentication via LDAP/RADIUS for the system itself, then the privilege check in xmlrpc.php can improperly test privileges in certain cases.

When xmlrpc.php attempts to check privileges it gathers account information via getUserEntry($username). This function returns an associative array that is missing the uid parameter if there is no matching local account. When checking privileges, a logic error causes this condition to not trigger the code that detects a lack of privileges to deny access.

This can allow a user with valid LDAP credentials, but no matching local account, to execute XMLRPC methods when they do not have the appropriate system-xmlrpc-ha-sync privilege. The available XMLRPC methods include exec_php which allows running arbitrary PHP code and by consequence, arbitrary shell commands.

POC script is attached that tests a variety of account types/privilege states. Read the comments and code for more info, but the accounts and infrastructure must already be setup for it to be of any use.


Files

poc-ace-xmlrpc-remoteauth.py (2.09 KB) poc-ace-xmlrpc-remoteauth.py Jim Pingle, 08/26/2026 06:05 PM
17056.patch (794 Bytes) 17056.patch Jim Pingle, 08/26/2026 06:26 PM
Actions

Also available in: Atom