Back to skill

Security audit

Adguard

Security checks for vulnerabilities and agentic risk

Overview

This AdGuard management skill does what it says, but it handles administrator access in ways that can weaken network protection or expose sensitive DNS/admin data.

Review before installing. Use only against an AdGuard instance you administer, prefer HTTPS or a protected local-only channel, do not store the admin password in shell startup files, and be aware that toggle and rule changes can immediately affect DNS filtering for all clients using that server. The allow/block implementation should be fixed or tested carefully because it may overwrite existing custom 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 (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/adguard.sh:8
Finding

Administrative Credentials and Session Data Transmitted over Plaintext HTTP

Content
View full analysis
/dev/null) ``` ### Technical Analysis The default AdGuard URL uses unencrypted HTTP, and the documentation also presents HTTP as the normal configuration. The login request sends the administrator username and password in a JSON body over this connection. Subsequent privileged API requests transmit the session cookie over the same unencrypted channel. HTTP provides neither confidentiality nor integrity. An attacker with a suitable network position can inspect credentials and session cookies or modify API requests and responses. This is particularly relevant because AdGuard Home is commonly administered over a shared local network, where compromised clients, malicious access points, ARP spoofing, or improperly isolated guest devices may provide an interception position. ### Attack Path 1. The operator configures or accepts an `http://` AdGuard URL. 2. The operator invokes any command, such as `status`, `block`, or `toggle`. 3. The script sends the administrator password to `/control/login` over plaintext HTTP. 4. A network-positioned attacker captures the HTTP request or the returned session cookie. 5. The attacker reuses the credential or cookie to invoke privileged AdGuard Home API endpoints. 6. The attacker can alter DNS filtering policy, disab ...[truncated 525 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/adguard.sh:121
Finding

Rule Addition Can Replace Existing Custom Filtering Rules

Content
View full analysis
Remediation
View remediation

other

Note
Location
scripts/adguard.sh:160
Finding

Status Command Unnecessarily Retrieves Sensitive DNS Query Logs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/adguard.sh:27
Finding

Unescaped Inputs Permit JSON and URL Request Manipulation

Content
View full analysis
/dev/null) ``` ```bash response=$(api_call GET "/filtering/check_host?host=${domain}") ``` ```bash response=$(api_call POST "/filtering/set_rules" "{\"rules\":\"${rule}\"}") ``` ### Technical Analysis User-controlled credentials and domain arguments are interpolated directly into JSON strings and URLs without context-appropriate encoding. Quotes, backslashes, control sequences, or JSON delimiters in a username, password, or domain can produce malformed JSON or alter its parsed structure. A domain containing a JSON-escaped newline sequence may also be interpreted as multiple filtering-rule lines after JSON decoding, depending on the server's rule parser. In the check operation, characters such as `&`, `#`, `?`, and percent-encoded sequences can alter query-string interpretation because the `host` value is not URL-encoded. This is request-data injection rather than shell command injection: the shell variables are quoted during command execution, so the reviewed code does not directly establish arbitrary local command execution. The vulnerable boundary is the generated HTTP request and the policy data interpreted by AdGuard Home. ### Attack Path 1. An attacker influences a domain supplied to `check`, `allow`, or `block`, such as through an automation pipeline that forwards untrusted input. 2. The value contains query delimiters, quotes, backslashes, or encoded rule separators. 3. The script concatenates the value directly into a URL or JSON document. 4. AdGuard Home receives a request whose ...[truncated 837 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:25
Finding

Documentation Encourages Plaintext Persistence of the Administrator Password

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Toggling protection is a safety-critical operation because it changes whether DNS filtering is active for the system or network. The script announces the action with a print statement, but does not provide a prior warning or confirmation before executing the state change.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 29)May include surrounding context.

Configuration

Create ~/.adguard/config.json or set environment variables:

bash
export ADGUARD_URL="http://192.168.1.100:3000"

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

Configuration

Create ~/.adguard/config.json or set environment variables:

bash
export ADGUARD_URL="http://192.168.1.100:3000"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill documents shell-based operational capabilities but does not declare any explicit tool scope or permissions boundary. In an agent environment, this can cause over-broad execution authority, making it easier for the skill to invoke shell actions that modify DNS filtering state without clear user or platform constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The toggle/protection feature can disable DNS filtering for the whole protected environment, but the documentation does not prominently warn that this reduces security and privacy for network users. That omission increases the chance of unsafe use, especially in troubleshooting workflows where an operator may disable protection without understanding the exposure created.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes managing blocklists/allowlists, checking filtering status, toggling protection, clearing cache, and viewing statistics. This file additionally documents the /querylog endpoint for retrieving recent DNS queries including client IPs and queried domains, which is a distinct monitoring/data-access capability not justified by the stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The query-log section documents access to recent DNS queries, including domains, client IPs, timestamps, and answers, which can reveal sensitive user activity. Without any privacy warning or handling guidance, the documentation normalizes access to sensitive telemetry and may encourage collection or exposure beyond legitimate troubleshooting needs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api.md (reported line 222)May include surrounding context.

bash
# 1. Check current status
curl -b cookies.txt http://localhost:3000/control/filtering/check_host?host=example.com

# 2. If blocked, add allowlist rule
curl -b cookies.txt -X POST http://localhost:3000/control/filtering/set_rules \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api.md (reported line 233)May include surrounding context.

Block a Domain

bash
curl -b cookies.txt -X POST http://localhost:3000/control/filtering/set_rules \
  -H "Content-Type: application/json" \
  -d '{"rules":"||malware.com^"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api.md (reported line 241)May include surrounding context.

Get Protection Status

bash
curl -b cookies.txt http://localhost:3000/control/status

Disable Protection Temporarily

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example shows how to disable DNS protection, which is a sensitive administrative action that can materially reduce network security if copied blindly or triggered without operator awareness. While this is documentation rather than executable logic, the absence of cautionary context, authorization guidance, or rollback advice increases the chance of unsafe use.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This login request transmits administrator credentials to the AdGuard API and uses the default base URL over plain HTTP. If used on an untrusted or shared network, an attacker could capture the password or authenticated session and gain administrative control over DNS filtering.

Content

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

sh
# Get and cache session cookie
get_session() {
    local response
    response=$(curl -s -w "\n%{http_code}" -X POST "${API_BASE}/login" \
        -H "Content-Type: application/json" \
        -d "{\"name\":\"${ADGUARD_USERNAME}\",\"password\":\"${ADGUARD_PASSWORD}\"}" \
        -c "$COOKIE_FILE" 2>/dev/null)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script authenticates to AdGuard Home using admin credentials and, by default, targets an HTTP URL rather than HTTPS. This exposes credentials and session cookies to interception on the local network and sends potentially sensitive management and query-related data without transport security or a user warning.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

Subsequent authenticated API requests reuse the session cookie and may retrieve or modify filtering configuration, status, and query-related data over the same transport. Over HTTP, these requests can leak administrative session state and sensitive DNS management data to a network attacker.

Content

Scanner excerpt · scripts/adguard.sh (reported line 48)May include surrounding context.

sh
local response
    
    if [ "$method" = "GET" ]; then
        response=$(curl -s -w "\n%{http_code}" -X GET "${API_BASE}${endpoint}" \
            -H "Content-Type: application/json" \
            -b "$COOKIE_FILE" 2>/dev/null)
    else

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The allow and block commands call the API endpoint that changes filtering rules immediately, which can affect system behavior and user network protections. Although the script prints status messages, it provides no confirmation step or explicit warning before making this configuration change.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown lists commands that modify AdGuard configuration or service behavior, including allow/block list changes, protection toggling, and cache clearing, but does not include a warning that these actions can immediately affect DNS filtering for users on the network. For markdown files, this category applies when the skill description omits warnings about behaviors that could affect user data, privacy, or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Clearing cache is an operationally impactful action that alters service state immediately. The script prints that it is clearing the cache, but does not warn users beforehand or require confirmation for this irreversible runtime change.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.