Back to skill

Security audit

AdGuard Home Manager

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches AdGuard Home administration, but it can change network-wide DNS filtering while using potentially unencrypted Basic Auth and has confusing rule-management behavior.

Review before installing. Use only with a trusted AdGuard Home instance, prefer HTTPS for any non-local endpoint, and use a dedicated low-privilege account with a unique password. Do not allow unattended agents to toggle filtering, add/remove rules, or inspect DNS logs unless you are comfortable with network-wide effects and household or organizational privacy exposure. Verify rule changes manually because the add/remove implementation appears to target filtering rules rather than DNS rewrite rules.

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

Error
Location
scripts/rules.sh:23
Finding

AdGuard credentials can be transmitted over plaintext HTTP

Content
View full analysis
/dev/null) ``` ### Technical Analysis The documentation explicitly recommends an HTTP URL as a valid configuration, and each script defaults to an `http://` endpoint. HTTP Basic authentication only Base64-encodes the username and password; it does not encrypt them. When a non-loopback HTTP endpoint is configured, the authorization header, API response, and administrative request body travel without transport encryption. An attacker capable of monitoring or modifying the network path can decode the header and recover the AdGuard Home credentials. The attacker may also tamper with administrative requests or responses. The default loopback URL is less exposed because traffic remains local, but the documented private-network example creates a realistic insecure deployment path. ### Attack Path 1. An operator follows the documented setup and configures `ADGUA ...[truncated 1161 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rules.sh:72
Finding

Untrusted rule input is embedded into JSON and jq source without safe encoding

Content
View full analysis
/dev/null) # Check current filtering rules and append current=$(echo "$rules_response" | jq -r '.filtering_status // []') updated=$(echo "$current" | jq '. + [{"rule": "'"$RULE"'", "enabled": true}]') # Update filtering rules update=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/set_rules" \ -H "Authorization: Basic ${AUTH}" \ -H "Content-Type: application/json" \ -d "{\"rules\":$(echo "$current" | jq '. + [{rules: [{text: "'"$RULE"'"}]}]')}" 2>/dev/null || true) # Simpler approach: try to add as raw filter URL add_result=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/add_rule" \ -H "Authorization: Basic ${AUTH}" \ -H "Content-Type: application/json" \ -d "{\"rule\":\"${RULE}\"}" 2>/dev/null || true) ``` ### Technical Analysis `RULE` originates from the second command-line argument and is attacker-controlled whenever an untrusted caller can influence invocation arguments. It is inserted directly into: - A jq program. - A nested jq-generated request payload. - A manually constructed JSON string. Quotes, backslashes, control characters, and crafted JSON or jq syntax are not escaped. A specially formed rule can therefore terminate the intended string, alter the generated structure, introduce additional fields or elements, or make parsing fail. This is not demonstrated as direct shell-command execution because the interpolated value is passed as an argument to `jq` rather than evaluated by the shell as a command. Nevertheless, it compromises the integrity of privileged requests sent to the AdGuard administrative API. ### Attack Path 1. An attacker or untrusted automation supplies a crafted value as the rule arg ...[truncated 1201 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rules.sh:64
Finding

Rule addition invokes multiple mutating endpoints and reports success after suppressed failures

Content
View full analysis
/dev/null || true) # Alternative: use set_rules rules_response=$(curl -s "${ADGUARD_BASE_URL}/control/status" \ -H "Authorization: Basic ${AUTH}" 2>/dev/null) # Check current filtering rules and append current=$(echo "$rules_response" | jq -r '.filtering_status // []') updated=$(echo "$current" | jq '. + [{"rule": "'"$RULE"'", "enabled": true}]') # Update filtering rules update=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/set_rules" \ -H "Authorization: Basic ${AUTH}" \ -H "Content-Type: application/json" \ -d "{\"rules\":$(echo "$current" | jq '. + [{rules: [{text: "'"$RULE"'"}]}]')}" 2>/dev/null || true) # Simpler approach: try to add as raw filter URL add_result=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/add_rule" \ -H "Authorization: Basic ${AUTH}" \ -H "Content-Type: application/json" \ -d "{\"rule\":\"${RULE}\"}" 2>/dev/null || true) if echo "$add_result" | jq -e '.status' >/dev/null 2>&1; then pass "Rule added successfully: ${RULE}" else # Fallback: try the refresh filtering approach refresh=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/refresh" \ -H "Authorization: Basic ${AUTH}" \ -H "Content-Type: application/json" \ -d '{"force": false}' 2>/dev/null || true) pass "Rule queued: ${RULE}" fi ``` ### Technical Analysis A single `add` operation attempts several different state-changing API calls: 1. `/control/filtering/add_url` 2. `/control/filtering/set_r ...[truncated 2049 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The manifest describes one set of capabilities, but the documented behavior includes different or missing functionality, including rule manipulation and query-log access patterns that are not cleanly represented. Description-behavior mismatch is dangerous because reviewers and users may approve the skill under false assumptions, enabling unexpected network-wide changes or monitoring.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script is presented as managing custom DNS rewrite rules, but its add/remove paths modify AdGuard filtering rules instead. This mismatch can cause operators or higher-level agents to believe they are making narrow DNS rewrite changes while actually altering global blocking behavior, enabling unintended censorship, outages, or policy bypass on the network.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises shell-capable behavior but does not declare any explicit tool scope such as allowed-tools or permissions. That increases the attack surface because a host agent may grant broader execution privileges than users expect, making command execution less transparent and harder to constrain.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill can inspect DNS query logs, which may reveal sensitive browsing and device activity across the network, but this monitoring capability is omitted from the high-level description. Hidden surveillance-relevant functionality materially increases privacy risk because users may enable the skill without understanding that it can expose network behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill exposes add/remove/toggle operations that can change DNS behavior for an entire network, yet it lacks a clear warning that these are network-wide administrative actions. This is dangerous because an unsuspecting user or delegated agent could disrupt connectivity, disable protections, or silently alter filtering for all clients.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Query-log inspection is broader than what is necessary for basic DNS ad-block management and can be used to observe user or household network activity. Because the stated purpose centers on administration of blocking behavior, including a surveillance-capable feature without strong justification creates unnecessary privacy exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill does not warn users that query_log can expose sensitive browsing, app, and device-resolution history for the whole network. Without a clear warning, operators may unintentionally grant access to highly sensitive household or organizational telemetry.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The inline comments explicitly describe adding blocking/filtering rules while the file-level purpose claims DNS rewrite management. This inconsistency increases the chance that maintainers, users, or an autonomous agent will invoke the script under false assumptions and unintentionally modify security-relevant DNS filtering state.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/rules.sh (reported line 64)May include surrounding context.

sh
add)
    log "Adding rule: ${RULE}"
    # Add a domain blocking rule via filtering rules
    response=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/add_url" \
      -H "Authorization: Basic ${AUTH}" \
      -H "Content-Type: application/json" \
      -d "{\"url\":\"data:$(echo -n "$RULE" | base64)\",\"name\":\"agent-added\"}" 2>/dev/null || true)

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/rules.sh (reported line 78)May include surrounding context.

sh
updated=$(echo "$current" | jq '. + [{"rule": "'"$RULE"'", "enabled": true}]')

    # Update filtering rules
    update=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/set_rules" \
      -H "Authorization: Basic ${AUTH}" \
      -H "Content-Type: application/json" \
      -d "{\"rules\":$(echo "$current" | jq '. + [{rules: [{text: "'"$RULE"'"}]}]')}" 2>/dev/null || true)

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/rules.sh (reported line 112)May include surrounding context.

sh
updated=$(echo "$current" | jq '. + [{"rule": "'"$RULE"'", "enabled": true}]')

    # Update filtering rules
    update=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/set_rules" \
      -H "Authorization: Basic ${AUTH}" \
      -H "Content-Type: application/json" \
      -d "{\"rules\":$(echo "$current" | jq '. + [{rules: [{text: "'"$RULE"'"}]}]')}" 2>/dev/null || true)

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/rules.sh (reported line 84)May include surrounding context.

sh
-d "{\"rules\":$(echo "$current" | jq '. + [{rules: [{text: "'"$RULE"'"}]}]')}" 2>/dev/null || true)

    # Simpler approach: try to add as raw filter URL
    add_result=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/add_rule" \
      -H "Authorization: Basic ${AUTH}" \
      -H "Content-Type: application/json" \
      -d "{\"rule\":\"${RULE}\"}" 2>/dev/null || true)

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/rules.sh (reported line 93)May include surrounding context.

sh
pass "Rule added successfully: ${RULE}"
    else
      # Fallback: try the refresh filtering approach
      refresh=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/filtering/refresh" \
        -H "Authorization: Basic ${AUTH}" \
        -H "Content-Type: application/json" \
        -d '{"force": false}' 2>/dev/null || true)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script defaults to using an unencrypted HTTP endpoint and sends Basic Authentication credentials in the request, which can expose the AdGuard Home username and password to network attackers via interception or traffic inspection. Because this skill manages DNS filtering, stolen credentials could let an attacker read stats and potentially modify blocking rules or other server settings depending on the account permissions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The outbound curl request itself is expected behavior for this skill, but in this implementation it transmits sensitive authentication material to a configurable remote endpoint without enforcing transport security. If ADGUARD_BASE_URL is pointed at a non-local or attacker-controlled host, the script will disclose valid credentials and internal DNS statistics to that destination.

Content

Scanner excerpt · scripts/stats.sh (reported line 28)May include surrounding context.

sh
log "Fetching ${PERIOD} stats..."

response=$(curl -s "${ADGUARD_BASE_URL}/control/stats" \
  -H "Authorization: Basic ${AUTH}" \
  -d "{\"period\":\"${PERIOD}\"}" \
  -H "Content-Type: application/json" 2>/dev/null)

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/toggle_filtering.sh (reported line 38)May include surrounding context.

sh
log "Setting DNS filtering to ${ENABLE}..."

response=$(curl -s -X POST "${ADGUARD_BASE_URL}/control/dns_config" \
  -H "Authorization: Basic ${AUTH}" \
  -H "Content-Type: application/json" \
  -d "{\"filtering_enabled\":${enabled_val}}" 2>/dev/null)