CVE-2025-6723
Executive Summary
CVE-2025-6723 is a local privilege escalation vulnerability in Chef InSpec, a compliance automation tool. The vulnerability stems from the creation of named pipes with overly permissive default Windows access controls. A local attacker can exploit this by interfering with the pipe connection process, potentially assuming the InSpec execution context. This could lead to elevated privileges or operational disruption. The vulnerability affects Chef InSpec versions up to 5.23 and before 7.0.107. No public proof-of-concept (PoC) or exploit code is currently available, and the EPSS score is 0.0%, indicating a low probability of exploitation in the wild at this time. The patch is available in version 7.0.107.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Chef InSpec is distributed as a Ruby gem (inspec) and as a standalone package. The vulnerability is in the core binary, not in a specific dependency. Organizations using InSpec in CI/CD pipelines or as an agent on Windows endpoints should prioritize patching to prevent local privilege escalation.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (Unscored by NVD, but based on the description, a reasonable vector is provided below)
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Local (L) – The attacker must have local access to the system.
- Attack Complexity (AC): Low (L) – The attack does not require special conditions.
- Privileges Required (PR): Low (L) – The attacker needs low-level privileges to interact with the named pipe.
- User Interaction (UI): None (N) – No user interaction is required.
- Scope (S): Unchanged (U) – The vulnerability does not affect resources beyond the InSpec process.
- Confidentiality (C): High (H) – The attacker can read sensitive data from the InSpec context.
- Integrity (I): High (H) – The attacker can modify data or execute commands in the InSpec context.
- Availability (A): High (H) – The attacker can disrupt the InSpec process.
Threat Level: High. While the EPSS score is low, the potential for privilege escalation on Windows systems makes this a significant risk for environments where InSpec is used.
Deep Dive & Mechanics
Chef InSpec uses named pipes for inter-process communication (IPC) on Windows. Named pipes are a mechanism for one-way or duplex communication between a pipe server and one or more pipe clients. The vulnerability arises because InSpec creates these pipes with default Windows access controls that are overly permissive. Specifically, the pipe's DACL (Discretionary Access Control List) may allow Everyone or Authenticated Users to connect to the pipe.
Attack Flow:
- Pipe Creation: InSpec (running as a service or high-privilege process) creates a named pipe (e.g.,
\\.\pipe\inspec_<session_id>) with weak permissions. - Attacker Reconnaissance: A local attacker with low privileges enumerates existing named pipes using tools like
PipeListorPowerShell(Get-ChildItem \\.\pipe\). - Pipe Interception: The attacker creates a malicious pipe client that connects to the InSpec pipe before the legitimate client (e.g., a child process) does. This is a classic "named pipe hijacking" or "pipe squatting" attack.
- Privilege Escalation: Once connected, the attacker can send crafted messages to the InSpec pipe server. Because the pipe server runs in a high-privilege context, the attacker can:
- Execute arbitrary commands with the privileges of the InSpec process.
- Read sensitive data (e.g., compliance reports, credentials).
- Disrupt the InSpec execution, causing denial of service.
The vulnerability is similar to CWE-269 (Improper Privilege Management) and CWE-732 (Incorrect Permission Assignment for Critical Resource).
Vulnerable vs. Patched Code
The vulnerable code is in the named pipe creation logic within the InSpec Windows agent. The exact code is not publicly available, but the fix involves setting a restrictive DACL on the named pipe.
Vulnerable (Conceptual):
// Vulnerable: Uses default security attributes
NamedPipeServerStream pipeServer = new NamedPipeServerStream(
"inspec_pipe",
PipeDirection.InOut,
1,
PipeTransmissionMode.Message,
PipeOptions.None);
Patched (Conceptual):
// Patched: Explicitly sets a restrictive DACL
PipeSecurity pipeSecurity = new PipeSecurity();
pipeSecurity.AddAccessRule(new PipeAccessRule(
new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null),
PipeAccessRights.FullControl,
AccessControlType.Allow));
pipeSecurity.AddAccessRule(new PipeAccessRule(
new SecurityIdentifier(WellKnownSidType.LocalSystemSid, null),
PipeAccessRights.FullControl,
AccessControlType.Allow));
NamedPipeServerStream pipeServer = new NamedPipeServerStream(
"inspec_pipe",
PipeDirection.InOut,
1,
PipeTransmissionMode.Message,
PipeOptions.None,
1024,
pipeSecurity);
The patched code ensures that only Administrators and SYSTEM can access the pipe, preventing low-privileged users from connecting.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Windows 10/11 or Windows Server 2019/2022.
- Install Chef InSpec version 5.23 (vulnerable).
- Create a low-privileged user account.
Exploitation Steps:
Identify the Pipe: As a low-privileged user, run PowerShell to list named pipes:
Get-ChildItem \\.\pipe\ | Where-Object { $_.Name -like "*inspec*" }Create a Malicious Pipe Client: Write a simple C# or PowerShell script that connects to the pipe and sends a command to execute a reverse shell or add a user to the Administrators group.
PowerShell Exploit (Conceptual):
$pipe = new-object System.IO.Pipes.NamedPipeClientStream(".", "inspec_pipe", [System.IO.Pipes.PipeDirection]::InOut) $pipe.Connect() $writer = new-object System.IO.StreamWriter($pipe) $writer.WriteLine("Add-LocalGroupMember -Group 'Administrators' -Member 'lowprivuser'") $writer.Flush() $pipe.Close()Trigger InSpec: Run InSpec from a high-privilege context (e.g., as a scheduled task or service). The malicious client will connect and execute the command.
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team
Detection:
- Monitor for unusual named pipe connections, especially from low-privileged processes to pipes created by high-privileged processes.
- Use Sysmon Event ID 17 (Pipe Created) and Event ID 18 (Pipe Connected) to track pipe activity.
- Look for processes connecting to pipes with names containing "inspec" from non-admin accounts.
Hunting:
- Query for named pipe creation events where the pipe name contains "inspec" and the DACL is not restrictive.
- Check for processes that are not InSpec (e.g.,
cmd.exe,powershell.exe) connecting to InSpec pipes.
Indicators of Compromise (IOCs)
- Named Pipe Names:
\\.\pipe\inspec_*(e.g.,inspec_pipe,inspec_1234) - Process Names:
inspec.exe,ruby.exe(if running as a Ruby gem) - Event Logs:
- Sysmon Event ID 17 (Pipe Created) with
PipeNamecontaining "inspec". - Sysmon Event ID 18 (Pipe Connected) with
PipeNamecontaining "inspec" andImagenot beinginspec.exe.
- Sysmon Event ID 17 (Pipe Created) with
- Registry: (If InSpec is installed as a service)
HKLM\SYSTEM\CurrentControlSet\Services\inspec
Detection Engineering
YARA Rule
rule CVE_2025_6723_NamedPipe_WeakACL {
meta:
description = "Detects Chef InSpec named pipe creation with weak DACL"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-6723"
strings:
$pipe_name = "inspec" nocase
$weak_acl = "D:(A;;GA;;;WD)" // Example: Everyone has Generic All
condition:
$pipe_name and $weak_acl
}
Sigma Rule
title: Chef InSpec Named Pipe Weak ACL
id: 7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e
status: experimental
description: Detects creation of Chef InSpec named pipes with overly permissive DACLs
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-6723
logsource:
product: windows
service: sysmon
detection:
selection:
EventID: 17
PipeName|contains: 'inspec'
condition: selection
falsepositives:
- Legitimate InSpec operations (should be rare)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $HOME_NET any (msg:"CVE-2025-6723 Chef InSpec Named Pipe Exploitation Attempt"; flow:to_server; content:"inspec"; nocase; sid:1000001; rev:1;)
Note: Suricata rules for named pipes are limited. This rule is a placeholder for network-based detection if the pipe communication is tunneled over TCP (unlikely). Local detection via Sysmon is preferred.
Remediation & Mitigation
Immediate:
- Upgrade Chef InSpec to version 7.0.107 or later.
- If upgrade is not possible, restrict access to the InSpec named pipes using Windows Firewall or AppLocker to only allow
SYSTEMandAdministrators.
Long-term:
- Implement the principle of least privilege for all IPC mechanisms.
- Regularly audit named pipe permissions using tools like
AccessChkfrom Sysinternals. - Monitor for CVEs related to Chef products and apply patches promptly.
Workaround:
- Run InSpec as a scheduled task under a dedicated service account with minimal privileges.
- Use Windows Defender Application Control (WDAC) to block unauthorized processes from connecting to named pipes.
Report generated by Valters IT DevSecOps & CTI Division