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

JP Updated by Jim Pingle 22 days ago Actions #1

Fixed in commit 889905ba4db8e1b873da28ae115a10b9f0fd0b05

Corrected the privilege check to use an existing helper function that doesn't have the same logic error.

Patch is attached.

JP Updated by Jim Pingle 22 days ago Actions #2

  • % Done changed from 0 to 100

JP Updated by Jim Pingle 2 days ago Actions #4

  • Status changed from Feedback to Resolved
  • Private changed from Yes to No

New version of the System Patches package includes a recommended patch entry for this.

Actions

Also available in: Atom