Back to skill

Security audit

Email Web Interface

Security checks for vulnerabilities and agentic risk

Overview

This skill is for email access, but its setup examples could expose a Gmail inbox and sending ability without enough protection.

Review carefully before installing. Do not deploy the shown Flask interface as-is; require authentication, bind locally or protect it behind HTTPS, disable debug mode, add CSRF protection, keep certificate validation enabled, pin container images, and store Gmail secrets outside versioned or image-baked config.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:79
Finding

IMAP TLS Certificate Validation Disabled

Content
View full analysis
array( 'verify_peer' => false, 'verify_peer_name' => false, ), ); ``` ### Technical Analysis The recommended Roundcube configuration explicitly disables both certificate-chain validation and server hostname verification for the Gmail IMAP connection. Although traffic remains encrypted, the client no longer verifies that it is communicating with the legitimate Gmail server. An attacker able to intercept or redirect network traffic can present an arbitrary TLS certificate. Because neither the certificate issuer nor hostname is verified, Roundcube can establish a connection to the attacker's server without detecting the impersonation. ### Attack Path 1. A user deploys Roundcube using the documented configuration. 2. An attacker obtains a network interception position or manipulates DNS, routing, or a local proxy. 3. The attacker redirects the IMAP connection to an attacker-controlled endpoint. 4. The endpoint presents an untrusted or hostname-mismatched TLS certificate. 5. Roundcube accepts the certificate because both verification controls are disabled. 6. Authentication data and mailbox communications can be intercepted or manipulated. ### Impact Assessment A successful attack can compromise credentials supplied to the IMAP service and expose email messages, attachments, metadata, and other mailbox content. Depending on the intercepted credentials and Gmail account configuration, the attacker may also obtain ongoing mailbox access or impersonate the account owner. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:170
Finding

Flask Development Server Exposed on All Network Interfaces with Debug Mode Enabled

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:142
Finding

Mailbox Reading and Email Sending Endpoints Lack Access Control

Content
View full analysis
') def view_message(message_id): """View specific message.""" email_iface = EmailInterface() message = email_iface.get_message(message_id) return render_template('message.html', message=message) @app.route('/compose', methods=['GET', 'POST']) def compose(): """Compose new email.""" if request.method == 'POST': to = request.form['to'] subject = request.form['subject'] body = request.form['body'] email_iface = EmailInterface() success = email_iface.send_email(to, subject, body) return jsonify({'success': success}) return render_template('compose.html') ``` ### Technical Analysis None of the routes verifies the caller's identity or checks whether the caller is authorized to access the configured mailbox. The application delegates operations to Gog using credentials available to the server, so every network caller effectively inherits the server's mailbox capabilities. The later documentation mentions authentication as a general security consideration, but the runnable example does not implement it. Combined with the `0.0.0.0` binding, the endpoints may be available to other hosts on the same network or any network to which the port is published. ### Attack Path 1. The custom interface is launched with access to an authenticated Gog Gmail profile. 2. An attacker discovers or otherwise reaches TCP port 8082. 3. The attacker requests `/` to retrieve inbox data. 4. The attacker supplies or discovers message identifiers and requests `/message/
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:156
Finding

Email-Sending Route Lacks Cross-Site Request Forgery Protection

Content
View full analysis
:8082/compose`. 3. The form contains attacker-selected recipient, subject, and body values. 4. The victim visits the malicious webpage. 5. The browser submits the cross-origin POST request to the email interface. 6. Because no CSRF token or origin validation is required, the server accepts the request and invokes Gog to send the email. ### Impact Assessment An attacker can cause arbitrary email to be sent using the configured Gmail account. This can facilitate phishing, account impersonatio ...[truncated 171 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:73
Finding

Gmail App Password Stored Directly in Roundcube Configuration

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The Docker example uses the floating image reference roundcube/roundcubemail without a tag or digest, which makes deployments non-reproducible and can silently pull a changed or compromised upstream image later. In a skill that handles live email access and credentials, supply-chain drift is more dangerous because a malicious or vulnerable image could expose mailbox contents or credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file instructs users to generate an app password and place it into configuration, and later enables viewing and sending email through a web interface. Although there is a later security considerations section, the skill description does not clearly warn users near the setup steps about the sensitivity of credentials and the privacy/integrity impact of exposing inbox access and send capability.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The custom Flask interface exposes inbox viewing, message retrieval, and email sending routes with no authentication or authorization checks, while also binding to 0.0.0.0. In context, this is especially dangerous because it provides direct access to a real Gmail-integrated mail system, enabling unauthorized reading or sending of email if the service is reachable.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description says the skill provides "draft creation/editing," and the usage/testing sections repeat draft management and draft saving as expected functionality. However, the only concrete custom interface code shown implements inbox listing, message viewing, and immediate sending; there is no draft creation, retrieval, update, or save path in the Flask routes or EmailInterface methods.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The document specifically states that "Ace's Gmail account needs" configuration, which hard-codes a particular account context in natural language. This can be a language/locale-style policy issue under the provided rule because it presumes a fixed organizational/user choice rather than explicitly offering selection or opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.