T09 · Insecure Skill Coding Practices
- Location
scripts/pve.sh:16- Finding
TLS Certificate Verification Disabled for Authenticated Proxmox API Requests
- Content
View full analysis
Vulnerability Details
File Location:
scripts/pve.sh:16-20
Related Documentation:SKILL.md:42-133,148
Vulnerability Type: Improper TLS certificate validation
Risk Level: HighVulnerable Code
bash api() { local method="${1:-GET}" local endpoint="$2" shift 2 curl -ks -X "$method" -H "$AUTH" "$PROXMOX_HOST/api2/json$endpoint" "$@" }The documentation also recommends this insecure configuration:
markdown - Use `-k` to skip SSL verification for self-signed certsTechnical Analysis
The
-koption instructscurlto accept a TLS certificate without verifying its authenticity. This option is applied to every API request, including requests carrying the reusable Proxmox API token in theAuthorizationheader.Encryption without certificate verification does not establish that the client is communicating with the intended Proxmox server. An attacker in a network interception position can present an arbitrary certificate, terminate the TLS connection, and read the authorization token and API traffic. The attacker can also return forged API responses.
Because the behavior is unconditional, users cannot obtain secure certificate validation without modifying the script.
Attack Path
- A user configures a valid Proxmox host and API token and invokes
pve.sh. - An attacker obtains a network interception position, such as through a compromised gateway, malicious access point, DNS manipulation, or local network spoofing.
- The attacker redirects or intercepts the connection to the configured Proxmox endpoint.
- The attacker presents an untrusted TLS certificate.
- The script accepts the certificate because
curl -kdisables verification. - The script sends the Proxmox API token in the
Authorizationheader to the attacker-controlled endpoint. - The attacker reuses the captured token against the real Proxmox API, subject to the permissio ...[truncated 692 chars]
- A user configures a valid Proxmox host and API token and invokes
- Remediation
View remediation
Remediation Suggestions
-
Remove the
-koption and require certificate validation by default:bash curl -sS -X "$method" \ -H "$AUTH" \ "$PROXMOX_HOST/api2/json$endpoint" \ "$@" -
For a private or self-signed Proxmox certificate, configure an explicit trusted CA certificate:
bash curl -sS --cacert "$PROXMOX_CA_FILE" \ -X "$method" \ -H "$AUTH" \ "$PROXMOX_HOST/api2/json$endpoint" \ "$@" -
Alternatively, install the internal CA in the operating system trust store so normal TLS verification succeeds.
-
Update
SKILL.mdto recommend trusting the Proxmox CA rather than disabling verification. -
If an insecure compatibility mode is essential, make it an explicit opt-in setting, display a prominent warning, and prohibit its use in production.
-
Rotate any API tokens that may previously have been sent over connections where certificate verification was disabled.
-
Assign tokens only the minimum privileges needed for intended operations.
-
