Back to skill

Security audit

Near Email Reporter

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it stores SMTP passwords from command-line input in a local plaintext config file while overstating email, alert, and scheduling capabilities.

Install only if you are comfortable with an unfinished reporter that does not actually send email or schedule alerts as shipped. Use an app-specific SMTP password, avoid reusable account passwords, assume the password may remain in shell history and ~/.near-email/config.json, and rotate the credential if it has already been used with this setup flow.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/emailer.js:110
Finding

SMTP Password Exposed Through Command-Line Arguments and Plaintext Configuration Storage

Content
View full analysis
` - SMTP password - `--from ` - From email address - `--secure` - Use SSL/TLS (default: false) **Example:** ```bash near-email setup --host smtp.gmail.com --port 587 --user myemail@gmail.com --pass mypassword --from myemail@gmail.com ``` ``` ### Technical Analysis The setup command accepts the SMTP password through the `--pass` process argument. Command-line secrets can be exposed through she ...[truncated 2522 chars]
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 (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description claims the skill sends NEAR reports and alerts via email with SMTP configuration, scheduling, and automatic reporting. The code does implement SMTP config storage and NEAR RPC querying, but it does not actually send email: the report command only prints the generated report and explicitly notes that email sending requires nodemailer, which is not used here. Likewise, the alert and schedule commands are placeholders that only print what they would do, with no alerting or scheduling logic. Additionally, the code performs outbound HTTPS requests to rpc.mainnet.near.org, which is a meaningful capability not reflected in the declared permissions. Therefore the declared purpose overstates implemented behavior and omits network access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly states that configuration is stored in ~/.near-email/config.json and the setup example includes --user and --pass, which implies SMTP credentials may be written to disk. Documenting credential storage without any warning about file permissions, plaintext secret handling, or safer alternatives can lead users to persist sensitive email credentials insecurely, increasing the risk of account compromise if the local system or backups are exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill encourages emailing NEAR account reports and alerts but does not disclose that account activity data will be transmitted to external SMTP providers and recipients. This can cause inadvertent data disclosure because users may treat account activity as sensitive operational or financial information and send it through third-party infrastructure without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Passing the SMTP password directly on the command line exposes credentials through shell history, process listings, audit logs, and terminal recording systems. In shared or monitored environments this can lead to credential theft and unauthorized access to the email account used for reporting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

SMTP credentials are collected from CLI arguments and persisted in a local JSON config file, but the tool provides no warning that sensitive secrets are being stored on disk. While the file mode is restricted to 0600, local secret storage still increases exposure through backups, shell history from passing --pass on the command line, malware, and multi-user endpoint compromise; in this skill context, those credentials could enable unauthorized email sending or access to the user's mail infrastructure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a functional email reporting skill with alerts, scheduling, and automatic reporting. In the implementation, report only fetches account data and prints a report to stdout, while alert and schedule explicitly state that required functionality is not implemented and only print 'would' messages.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The usage/help text advertises report <account> [recipient] Send transaction report, which implies actual email delivery. However, the report branch only logs the generated report and then states that email sending requires nodemailer installation, contradicting the documented behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.