Back to skill

Security audit

Haproxy

Security checks for vulnerabilities and agentic risk

Overview

This HAProxy reference skill does not execute system changes itself, but it presents unsafe production-impacting HAProxy examples without enough warning.

Install only if you treat it as a quick reference, not production-ready guidance. Before copying its HAProxy examples, replace sample credentials, avoid wildcard admin binds, require TLS certificate verification, restrict stats/admin endpoints to trusted management networks, and be careful with runtime commands that can disable or drain live backends.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
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: Medium

Vulnerable Code:

text
server srv2 10.0.0.2:443 ssl verify none  # Skip verification

Technical Analysis

The verify none option 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

  1. An operator copies the documented verify none server configuration into a deployed HAProxy configuration.
  2. 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.
  3. The attacker redirects the backend connection to an attacker-controlled TLS endpoint.
  4. The malicious endpoint presents an arbitrary certificate.
  5. Because certificate validation is disabled, HAProxy accepts the endpoint and forwards application traffic through it.
  6. 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]

Remediation
View remediation

Remediation Suggestions

  • Replace verify none with 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.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/script.sh:540
Finding

HAProxy Administrative Statistics Interface Is Exposed with Predictable Credentials

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:540-545
Vulnerability Type: Exposed administrative interface with hard-coded credentials
Risk Level: High

Vulnerable Code:

text
listen stats
    bind *:8404
    stats enable
    stats uri /stats
    stats refresh 10s
    stats auth admin:secretpassword
    stats admin if TRUE    # Allow admin actions (drain/disable)

Technical Analysis

This reference configuration combines three unsafe properties:

  • bind *:8404 listens on all available network interfaces.
  • stats auth admin:secretpassword uses predictable, hard-coded example credentials.
  • stats admin if TRUE unconditionally enables administrative operations.

The shell script only prints this example; it does not deploy or activate the listener. However, an operator who copies the block without additional network restrictions can expose an administrative HAProxy endpoint to untrusted networks. The documented password is publicly known and provides no meaningful protection if left unchanged.

Unconditionally enabling stats admin increases the endpoint from a monitoring surface to an operational control surface. An authenticated user can perform actions such as placing servers into maintenance, disabling them, or changing their availability state.

Attack Path

  1. An operator copies the example into an active HAProxy configuration.
  2. Port 8404 becomes reachable on one or more untrusted interfaces because of bind *:8404.
  3. An attacker scans the host, discovers the HAProxy statistics endpoint, and requests /stats.
  4. The attacker authenticates with the documented admin:secretpassword credentials.
  5. Because stats admin if TRUE enables administrative controls for every authenticated session, the attacker invokes drain, disable, or maintenance actions against backend servers.
  6. The attacker disrupts routing capacity, causes service degradation, or m ...[truncated 692 chars]
Remediation
View remediation

Remediation Suggestions

  • Bind the statistics interface only to localhost or a dedicated management address:
    text
    bind 127.0.0.1:8404
    
  • Enforce network-layer restrictions through firewall rules, a private management network, or an authenticated administrative proxy.
  • Replace example credentials with unique, high-entropy credentials supplied through a protected deployment process.
  • Do not commit operational credentials to source code or documentation intended for direct copying.
  • Remove stats admin if TRUE unless interactive administrative operations are explicitly required.
  • If administration is necessary, limit it with an ACL rather than enabling it unconditionally.
  • Protect the endpoint with TLS so credentials and monitoring information are not transmitted in plaintext.
  • Add a conspicuous warning explaining that wildcard binding, sample credentials, and unconditional administration are not production-safe defaults.
  • Monitor authentication failures and administrative actions, and regularly review endpoint exposure.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:568
Finding

Credentials Are Embedded in a Plaintext HTTP Command

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:568
Vulnerability Type: Plaintext credential exposure
Risk Level: Medium

Vulnerable Code:

bash
curl -s "http://admin:pass@haproxy:8404/stats;csv"

Technical Analysis

The example embeds a username and password directly in an HTTP URL. Although the command is contained in a quoted heredoc and is only printed as reference material, copying it with real credentials creates several disclosure channels.

URL-embedded credentials may be retained in shell history, terminal logs, support transcripts, automation logs, or process metadata. In addition, the use of http:// sends both the HTTP Basic Authentication credentials and returned statistics without transport encryption. Any party able to observe the relevant network path may capture and reuse the credentials.

The use of curl -s suppresses ordinary progress and error output but provides no security protection.

Attack Path

  1. An operator copies the command and replaces the sample values with valid HAProxy statistics credentials.
  2. The command is stored in shell history, process-observation data, automation logs, or another local record; alternatively, an attacker monitors the plaintext network connection.
  3. The attacker extracts the username and password from the command record or HTTP Authorization header.
  4. The attacker reuses the credentials against the HAProxy statistics endpoint.
  5. The attacker reads operational data and, if the same account can access an interface with administrative actions enabled, may alter backend availability.

Impact Assessment

The immediate impact is disclosure of statistics-interface credentials and unencrypted monitoring data. Reused credentials may allow unauthorized access to infrastructure topology, server health, traffic volumes, and session statistics.

If the account is associated with the administrative interface shown elsewhere in ...[truncated 309 chars]

Remediation
View remediation

Remediation Suggestions

  • Use HTTPS with a properly validated server certificate:
    bash
    curl --fail --silent --show-error --user "$HAPROXY_STATS_USER:$HAPROXY_STATS_PASSWORD" \
      "https://haproxy.example.internal:8404/stats;csv"
    
  • Do not place literal credentials in source files, command documentation, or URLs.
  • Retrieve credentials from an appropriately protected secret store or narrowly scoped runtime environment.
  • Prevent commands containing secrets from being written to shell history.
  • Prefer short-lived, least-privileged credentials where the deployment supports them.
  • Restrict the statistics endpoint to trusted management hosts and networks.
  • Ensure logs and monitoring systems redact authorization data and URLs containing user information.
  • Clearly mark all displayed credentials as placeholders and warn users not to copy them into production configurations.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The example explicitly documents a backend server with ssl verify none, which disables TLS certificate validation for upstream connections. If adopted by users, this permits man-in-the-middle interception or redirection to an impostor backend, defeating the security benefits of TLS on the backend leg.

Content

Scanner excerpt · scripts/script.sh (reported line 436)May include surrounding context.

sh
```
backend secure_servers
    server srv1 10.0.0.1:443 ssl verify required ca-file /etc/ssl/ca.pem
    server srv2 10.0.0.2:443 ssl verify none  # Skip verification
```

## Let's Encrypt Integration

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This shell skill is primarily a reference viewer, but the emitted content includes commands that disable servers, drain traffic, and change live backend weights. The section documents the commands but does not include any cautionary note that these actions affect production traffic and can disrupt availability if run against a live HAProxy admin socket.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.