Loading vulnerability details...
| Property | Value |
|---|---|
| Advisory ID | SGZ-2026-2DA82 |
| Severity | HIGH |
| CWE | CWE-22 |
| Confidence | 90% |
| Category | logic_flaw |
| Exploitability | possible |
| Package | license-generator@latest (go) |
| Location | tmpl.go:48-51 |
| Attack Vector | NETWORK |
| Attack Complexity | LOW |
| Privileges Required | NONE |
| Discovered By | SafeGuard Zero-Day AI Discovery Engine |
The fetchTemplate function reads a file from a path supplied via the templateFile argument without any validation or sanitization. An attacker controlling this argument can supply path traversal sequences (e.g., "../../etc/passwd") to read arbitrary files on the server, leading to information disclosure.
The vulnerability was identified in the file tmpl.go at lines 48-51 within the license-generator package (version latest). Any code path that invokes these functions inherits this vulnerability.
File: tmpl.go (lines 48-51)
d, err := ioutil.ReadFile(templateFile)
if err != nil {
return "", fmt.Errorf("license file: %w", err)
}
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.
Supply a crafted templateFile value such as "../../../../etc/passwd" via the CLI or API that forwards the argument to fetchTemplate, causing the server to read and return the contents of the targeted file.
Disclosure of arbitrary files on the host system, potentially exposing sensitive configuration, credentials, or source code.
Validate the templateFile argument to ensure it refers to a file within an allowed directory, reject absolute paths, and sanitize any ".." segments. Consider using a whitelist of permitted filenames or a sandboxed directory.
Advisory: SGZ-2026-2DA82 | 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-2DA82 |
| Severity | HIGH |
| CWE | CWE-22 |
| Confidence | 90% |
| Category | logic_flaw |
| Exploitability | possible |
| Package | license-generator@latest (go) |
| Location | tmpl.go:48-51 |
| Attack Vector | NETWORK |
| Attack Complexity | LOW |
| Privileges Required | NONE |
| Discovered By | SafeGuard Zero-Day AI Discovery Engine |
The fetchTemplate function reads a file from a path supplied via the templateFile argument without any validation or sanitization. An attacker controlling this argument can supply path traversal sequences (e.g., "../../etc/passwd") to read arbitrary files on the server, leading to information disclosure.
The vulnerability was identified in the file tmpl.go at lines 48-51 within the license-generator package (version latest). Any code path that invokes these functions inherits this vulnerability.
File: tmpl.go (lines 48-51)
d, err := ioutil.ReadFile(templateFile)
if err != nil {
return "", fmt.Errorf("license file: %w", err)
}
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.
Supply a crafted templateFile value such as "../../../../etc/passwd" via the CLI or API that forwards the argument to fetchTemplate, causing the server to read and return the contents of the targeted file.
Disclosure of arbitrary files on the host system, potentially exposing sensitive configuration, credentials, or source code.
Validate the templateFile argument to ensure it refers to a file within an allowed directory, reject absolute paths, and sanitize any ".." segments. Consider using a whitelist of permitted filenames or a sandboxed directory.
Advisory: SGZ-2026-2DA82 | 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 high-severity vulnerability could allow attackers to gain unauthorized access, execute arbitrary code, or compromise data integrity. Prompt remediation is strongly recommended.
Isolate affected systems from untrusted networks until patching is complete
Implement enhanced monitoring for exploitation attempts and unusual behavior