Insecure Named Pipe or IPC Permissions

A named pipe or other local IPC endpoint used by the application accepts connections from any local user, exposing privileged functions or data to them.

SeverityMedium
CVSS 3.15.3 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L Open in the calculator
CVSS 4.04.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N Open in the calculator
CWECWE-732: Incorrect Permission Assignment for Critical Resource
OWASP Top 10A01:2025 Broken Access Control
MITRE ATT&CKT1559 Inter-Process Communication, T1068 Exploitation for Privilege Escalation
CategoryBroken Access Control

Description

The application exposes an inter-process communication (IPC) endpoint with permissions that let users who should not use it connect to it. Thick clients commonly pair a user interface running as the signed-in user with a background service running as SYSTEM or another privileged account, and the two communicate through a named pipe, a local TCP port, a WCF or .NET remoting endpoint, a COM server or shared memory. If the endpoint accepts any local user, and the service does not itself check who is calling, any local user, or malware running as one, can send it commands and invoke the functions it exposes with the privileges of the process behind it.

Named pipes created with a NULL DACL grant full access to everyone, and even the default security descriptor gives read access to Everyone and the anonymous account. A TCP port bound to the loopback address is still reachable by every user and process on the computer. A related variant is pipe squatting, where an attacker creates a pipe with the expected name before the genuine server does.

The typical result is unauthorised access to data or settings held by the service, and because the attacker needs local access to the computer, the rating is limited. Exposed commands frequently include actions such as running an update from a given path, writing configuration or files, or starting processes, which a standard user can then trigger with the service's privileges. Where an exposed function can write files, install updates or start processes, the result is full privilege escalation to SYSTEM, and the finding should then be rated high.

The weakness is identified by enumerating the application's pipes and ports, for example with Sysinternals accesschk and pipelist or the process's open handles, reviewing their security descriptors, and connecting as a standard user to send messages captured from, or reconstructed from, the client.

Remediation

Restrict who can reach the endpoint, and check the caller on every request, following Microsoft's guidance on named pipe security and access rights:

  • Create named pipes with an explicit security descriptor that grants access only to the accounts that need it, never a NULL DACL, and set PIPE_REJECT_REMOTE_CLIENTS unless network access is required. Create the first instance with FILE_FLAG_FIRST_PIPE_INSTANCE, so that creating the pipe fails, rather than silently joining it, if another process has already taken the name.
  • In the server, identify the caller, for example with GetNamedPipeClientProcessId or by impersonating the client with ImpersonateNamedPipeClient and checking its token, and authorise each command against that identity.
  • Expose only the operations the user interface genuinely needs, and treat every message as untrusted input: validate paths, refuse arbitrary file locations and command lines, and require signed packages for any update operation.
  • For local TCP, WCF and remoting endpoints, require authentication and authorisation on the endpoint itself rather than relying on it being local.
  • Run the service with the least privilege it needs.

Confirm the fix by repeating the enumeration and attempting the same commands as a standard user.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Thick Clients Findings

Every Thick Clients finding