T09 · Insecure Skill Coding Practices
- Location
scripts/script.sh:436- Finding
Backend TLS Certificate Verification Is Disabled in Reference Configuration
- Content
View full analysis
Vulnerability Details
File Location:
scripts/script.sh:436
Vulnerability Type: Backend TLS certificate validation bypass
Risk Level: MediumVulnerable Code:
text server srv2 10.0.0.2:443 ssl verify none # Skip verificationTechnical Analysis
The
verify noneoption instructs HAProxy not to validate the backend server's TLS certificate. Although this script only prints reference documentation and does not install the configuration itself, the example is presented without a prominent warning that it is unsuitable for production.If an operator copies this configuration, encryption may still be established, but HAProxy will not authenticate the identity of the backend. A forged, self-signed, expired, or otherwise untrusted certificate will therefore be accepted. This removes the protection TLS normally provides against backend impersonation and man-in-the-middle attacks.
Attack Path
- An operator copies the documented
verify noneserver configuration into a deployed HAProxy configuration. - An attacker obtains a network position between HAProxy and the backend, such as through routing compromise, DNS manipulation, ARP spoofing, or access to an intermediate network.
- The attacker redirects the backend connection to an attacker-controlled TLS endpoint.
- The malicious endpoint presents an arbitrary certificate.
- Because certificate validation is disabled, HAProxy accepts the endpoint and forwards application traffic through it.
- The attacker can inspect or modify proxied requests and responses, subject to the application-layer protections in use.
Impact Assessment
This can compromise the confidentiality and integrity of traffic between HAProxy and the affected backend. The attacker may obtain session tokens, credentials, API data, personal information, or other content carried in requests and responses. Modified responses could also be used to corrupt application data ...[truncated 256 chars]
- An operator copies the documented
- Remediation
View remediation
Remediation Suggestions
- Replace
verify nonewith certificate validation:text server srv2 10.0.0.2:443 ssl verify required ca-file /etc/haproxy/backend-ca.pem - Use a CA bundle that contains only the authorities required to authenticate the backend where practical.
- Ensure the backend certificate contains the expected DNS name and configure server-name indication and hostname verification as supported by the deployed HAProxy version.
- Remove the insecure example or label it explicitly as a temporary diagnostic configuration that must never be used in production.
- Establish certificate rotation and expiration monitoring for backend services.
- Restrict backend network access so that only HAProxy nodes can connect to backend service ports.
- Replace
