Loading vulnerability details...
| Property | Value |
|---|---|
| Advisory ID | SGZ-2026-B0137 |
| Severity | MEDIUM |
| CWE | CWE-73 |
| Confidence | 70% |
| Category | logic_flaw |
| Exploitability | possible |
| Package | addlicense@latest (go) |
| Location | main.go:30-38 |
| Attack Vector | LOCAL |
| Attack Complexity | LOW |
| Privileges Required | LOW |
| Discovered By | SafeGuard Zero-Day AI Discovery Engine |
The tool accepts file patterns from the command line and writes license headers directly to matched files without validating that the paths are within a safe directory. An attacker who can influence the pattern argument can cause the program to overwrite arbitrary files on the filesystem, leading to potential defacement or injection of malicious code.
The vulnerability was identified in the file main.go at lines 30-38 within the addlicense package (version latest). Any code path that invokes these functions inherits this vulnerability.
File: main.go (lines 30-38)
func processFile(path string) error {
data, err := ioutil.ReadFile(path)
if err != nil { return err }
// prepend license header
newData := []byte(licenseHeader + string(data))
return ioutil.WriteFile(path, newData, 0644)
}
The code above demonstrates the vulnerable pattern. This code is executed at runtime and can be directly exploited by an attacker with the appropriate access level.
Provide a pattern like '../../etc/passwd' to cause the program to prepend a license header to /etc/passwd, corrupting the file.
Overwrite of critical system files, leading to denial of service or code execution.
Validate that all matched file paths reside within a designated project directory before writing. Reject or sanitize any paths that escape the allowed root.
Advisory: SGZ-2026-B0137 | Source: SafeGuard Zero-Day AI Discovery | Status: Candidate
This vulnerability was autonomously discovered by SafeGuard's AI-powered Zero-Day Discovery engine using TAOR (Think-Act-Observe-Repeat) agentic analysis on the package source code. It is not yet tracked in any public vulnerability database (CVE, NVD, GHSA, OSV). This finding should be triaged by a security engineer and, if confirmed, reported upstream to the package maintainer.
| Property | Value |
|---|---|
| Advisory ID | SGZ-2026-B0137 |
| Severity | MEDIUM |
| CWE | CWE-73 |
| Confidence | 70% |
| Category | logic_flaw |
| Exploitability | possible |
| Package | addlicense@latest (go) |
| Location | main.go:30-38 |
| Attack Vector | LOCAL |
| Attack Complexity | LOW |
| Privileges Required | LOW |
| Discovered By | SafeGuard Zero-Day AI Discovery Engine |
The tool accepts file patterns from the command line and writes license headers directly to matched files without validating that the paths are within a safe directory. An attacker who can influence the pattern argument can cause the program to overwrite arbitrary files on the filesystem, leading to potential defacement or injection of malicious code.
The vulnerability was identified in the file main.go at lines 30-38 within the addlicense package (version latest). Any code path that invokes these functions inherits this vulnerability.
File: main.go (lines 30-38)
func processFile(path string) error {
data, err := ioutil.ReadFile(path)
if err != nil { return err }
// prepend license header
newData := []byte(licenseHeader + string(data))
return ioutil.WriteFile(path, newData, 0644)
}
The code above demonstrates the vulnerable pattern. This code is executed at runtime and can be directly exploited by an attacker with the appropriate access level.
Provide a pattern like '../../etc/passwd' to cause the program to prepend a license header to /etc/passwd, corrupting the file.
Overwrite of critical system files, leading to denial of service or code execution.
Validate that all matched file paths reside within a designated project directory before writing. Reject or sanitize any paths that escape the allowed root.
Advisory: SGZ-2026-B0137 | Source: SafeGuard Zero-Day AI Discovery | Status: Candidate
This vulnerability was autonomously discovered by SafeGuard's AI-powered Zero-Day Discovery engine using TAOR (Think-Act-Observe-Repeat) agentic analysis on the package source code. It is not yet tracked in any public vulnerability database (CVE, NVD, GHSA, OSV). This finding should be triaged by a security engineer and, if confirmed, reported upstream to the package maintainer. This vulnerability involves weaknesses in
This medium-severity vulnerability could be exploited under certain conditions to compromise security controls or access sensitive information. Should be addressed in a timely manner.
Isolate affected systems from untrusted networks until patching is complete
Implement enhanced monitoring for exploitation attempts and unusual behavior