T09 · Insecure Skill Coding Practices
- Location
SKILL.md:22- Finding
TLS Certificate Verification Disabled for Authenticated API Requests
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 22-31
Vulnerability Type: TLS certificate validation bypass resulting in potential bearer-token disclosure
Risk Level: HighVulnerable Code
bash curl -s -k -X GET "https://$LOGINSIGHT_HOST/api/v1/health" \ -H "Authorization: Bearer $LOGINSIGHT_API_TOKEN" \ -H "Accept: application/json" | jq '.'bash curl -s -k -X GET "https://$LOGINSIGHT_HOST/api/v1/cluster/nodes" \ -H "Authorization: Bearer $LOGINSIGHT_API_TOKEN" \ -H "Accept: application/json" | jq '.nodes[] | {id, ip, status, uptime}'Technical Analysis
Both authenticated requests use the
curl -koption, which disables TLS certificate-chain and hostname verification. The bearer token is therefore sent over an encrypted connection without reliable authentication of the remote server.Network access and bearer-token authentication are necessary for the Skill's declared health-check functionality. There is no evidence of intentional credential exfiltration. However, disabling certificate validation is not necessary and violates minimum-privilege and secure-transport principles. An attacker capable of intercepting or redirecting traffic could present an arbitrary certificate, impersonate the configured Log Insight server, and receive the
Authorizationheader.Attack Path
- The Agent reads
LOGINSIGHT_HOSTandLOGINSIGHT_API_TOKENfrom its environment. - An attacker gains a network interception or redirection position, such as through DNS poisoning, routing manipulation, or a hostile proxy.
- The attacker presents a certificate that is untrusted or does not match
LOGINSIGHT_HOST. - Because
curl -ksuppresses certificate and hostname validation errors, the Agent establishes the connection. - The Agent sends
Authorization: Bearer $LOGINSIGHT_API_TOKENto the impersonated endpoint. - The attacker captures the token and can also return fabric ...[truncated 673 chars]
- The Agent reads
- Remediation
View remediation
Remediation Suggestions
- Remove
-kfrom bothcurlcommands so certificate-chain and hostname validation remain enabled. - For environments using a private certificate authority, supply a securely provisioned CA bundle with
--cacert /trusted/path/ca.pemrather than disabling validation globally. - Restrict
LOGINSIGHT_HOSTto an administrator-approved hostname and reject unexpected URL components or untrusted runtime overrides before transmitting credentials. - Use a dedicated, read-only API token limited to health and node-status endpoints.
- Rotate the token if these commands have been used across networks where interception may have been possible.
- Avoid verbose logging or shell tracing that could expose the
Authorizationheader. - Fail closed when TLS validation fails and report the certificate error rather than retrying insecurely.
- Remove
