<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Nsswitch - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/nsswitch/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 20 Jul 2026 12:39:53 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/nsswitch/feed.xml" rel="self" type="application/rss+xml"/><item><title>Sudo Chroot Privilege Escalation via NSSwitch File Manipulation (CVE-2025-32463)</title><link>https://feed.craftedsignal.io/briefs/2026-07-cve-2025-32463-sudo-chroot/</link><pubDate>Mon, 20 Jul 2026 12:39:53 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-cve-2025-32463-sudo-chroot/</guid><description>Attackers can exploit CVE-2025-32463, a privilege escalation vulnerability in `sudo` when used with `chroot`, by creating a malicious `nsswitch.conf` file and associated Name Service Switch (NSS) modules within a controlled chroot environment to trick `sudo` into loading attacker-controlled code, leading to root privileges on Linux systems.</description><content:encoded><![CDATA[<p>CVE-2025-32463 describes a critical privilege escalation vulnerability affecting the <code>sudo</code> utility when used with the <code>chroot</code> command on Linux systems. This vulnerability allows an attacker to gain root privileges by manipulating the Name Service Switch (NSS) configuration. Specifically, a malicious actor stages a fake root filesystem (e.g., in <code>/tmp/chroot</code>), which includes a specially crafted <code>nsswitch.conf</code> file and attacker-controlled NSS modules (e.g., <code>libnss_*.so</code>). When <code>sudo</code> executes a command within this <code>chroot</code> environment, it can be tricked into resolving names using the attacker's malicious NSS configuration. This forces <code>sudo</code> to load the attacker's libraries, which then execute arbitrary code with root privileges. The technique relies on the creation of <code>nsswitch.conf</code> in non-standard locations by shell processes, serving as an early indicator of this exploitation attempt.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker establishes initial access to a Linux system as a low-privileged user.</li>
<li>The attacker creates a temporary directory structure to serve as a fake root filesystem, for example, <code>/tmp/chroot</code>.</li>
<li>The attacker places a crafted <code>nsswitch.conf</code> file within this fake root, typically at <code>/tmp/chroot/etc/nsswitch.conf</code>, by using a shell process.</li>
<li>The attacker also places malicious Name Service Switch (NSS) modules (e.g., <code>libnss_*.so</code>) into appropriate library paths within the fake root, such as <code>/tmp/chroot/lib</code> or <code>/tmp/chroot/usr/lib</code>.</li>
<li>The attacker then executes a <code>sudo chroot</code> command, directing it to use the <code>chroot</code> environment they've created (e.g., <code>sudo chroot /tmp/chroot</code>).</li>
<li>During the execution of <code>sudo chroot</code>, if name resolution is triggered, <code>sudo</code> attempts to load NSS modules from the chrooted environment, inadvertently loading the attacker's malicious modules.</li>
<li>The malicious NSS module executes arbitrary code with root privileges, leading to a complete system compromise and full privilege escalation.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2025-32463 results in complete privilege escalation to root on the affected Linux system. This grants the attacker full control over the compromised machine, enabling them to install backdoors, exfiltrate sensitive data, disrupt services, or launch further attacks. While specific victim numbers are not available, the widespread use of <code>sudo</code> and <code>chroot</code> means a broad range of Linux environments are potentially vulnerable if not patched. Organizations using <code>sudo</code> with <code>chroot</code> functionality are at high risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the provided Sigma rule to your SIEM to detect suspicious <code>nsswitch.conf</code> file creations outside standard paths.</li>
<li>Patch CVE-2025-32463 immediately by updating <code>sudo</code> and <code>glibc</code> to the latest versions provided by your Linux distribution vendor.</li>
<li>Enable comprehensive file creation and process execution logging to capture <code>file.path</code>, <code>process.name</code>, and <code>event.type</code> to activate the rules above.</li>
<li>Configure <code>sudoers</code> to disallow <code>chroot</code> if not explicitly required, and enforce <code>env_reset</code>, <code>noexec</code>, and <code>secure_path</code> policies.</li>
<li>Mount <code>/tmp</code> and <code>/var/tmp</code> filesystems with <code>noexec</code>, <code>nosuid</code>, and <code>nodev</code> options to prevent execution of attacker-controlled libraries or binaries from user-writable temporary directories.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>privilege-escalation</category><category>linux</category><category>cve</category><category>vulnerability</category><category>sudo</category><category>nsswitch</category></item></channel></rss>