Skip to content
Access control Write-up Intermediate

3CX Phone System Local Privilege Escalation Vulnerability

A local privilege escalation vulnerability in the Windows version of 3CX Phone System allowed an unprivileged local user to read a configuration file containing PostgreSQL superuser credentials, then use those credentials to load a malicious DLL into the PostgreSQL service running as NT AUTHORITY\SYSTEM and escalate to full administrator. A separate post-authentication arbitrary file read existed in the Linux management console's Terminal feature via allowed commands.

Adam Crosser Follow

Published on praetorian.com

In an effort to safeguard our customers, we perform proactive vulnerability research with the goal of identifying zero-day vulnerabilities that are likely to impact the security of leading organizations. Recently, we decided to take a look at the 3CX Phone Management System with the goal of identifying an…

Justin Copeland, on praetorian.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the config.json file containing PostgreSQL superuser credentials was readable by any local user, and the PostgreSQL service ran as NT AUTHORITY\SYSTEM with the ability to load arbitrary DLLs, allowing privilege escalation.

What the attacker needed

Unprivileged local access to Windows server; PostgreSQL service running as SYSTEM; authenticated access to Linux management console

The fix

The local privilege escalation was fixed in version 20 update 1, and the Terminal feature containing the file read was removed in new versions.

How it was found

  1. As an unprivileged local user, read the config.json file in the ProgramData directory.
  2. Extract the PostgreSQL credentials from the file.
  3. Connect to the PostgreSQL service using those credentials, which have superuser privileges.
  4. Use PostgreSQL functionality to load a malicious DLL, causing code execution as NT AUTHORITY\SYSTEM.
  5. Overwrite a service binary that runs with full SYSTEM privileges and restart the service to gain full administrator rights.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes two security problems in a phone management system. The first lets someone who already has a low-level login on a Windows server read a file with powerful database passwords, then use those passwords to run their own code as the highest-level system user. The second lets a logged-in administrator on Linux read any file on the server by misusing built-in diagnostic commands.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Adam Crosser

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.