Back to skill

Security audit

AI SEO Optimizer

Security checks for vulnerabilities and agentic risk

Overview

The skill does not show malware or credential theft, but it should be reviewed because it presents simulated SEO rankings and metrics as real business intelligence.

Review this carefully before installing for production SEO work. It appears to be a mock/prototype package rather than a real SEO intelligence service, so do not rely on its ranking, search-volume, difficulty, or competitor outputs for business decisions unless the publisher clearly labels and replaces the simulated data sources. Avoid sending sensitive unpublished content until data handling is documented.

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
src/content-analyzer.js:258
Finding

Regular Expression Injection Enables Event-Loop Denial of Service

Content
View full analysis

Vulnerability Details

File Location: src/content-analyzer.js, lines 258-264
Vulnerability Type: Regular expression injection and denial of service
Risk Level: Medium

Vulnerable Code

javascript
for (const keyword of keywords) {
  const keywordLower = keyword.toLowerCase();
  const occurrences = (contentLower.match(new RegExp(keywordLower, 'g')) || []).length;
  const density = (occurrences / this._countWords(content)) * 100;

Technical Analysis

The application inserts an attacker-controlled keyword directly into the RegExp constructor without escaping regular-expression metacharacters. The keyword is therefore interpreted as executable regular-expression syntax rather than as a literal search term.

An invalid expression such as [ causes the constructor to throw a syntax error. More importantly, a pattern containing nested or ambiguous quantifiers, such as (a+)+$, can cause catastrophic backtracking when evaluated against suitably crafted content. Because Node.js evaluates this regular expression synchronously on the main event loop, a computationally expensive match can prevent the process from servicing other requests.

Both the content and keyword arrays are exposed through the exported optimizeContent(content, keywords) API and the optimize_content action handled by index.js. No input-size limits, keyword-count limits, regular-expression escaping, or execution timeout protects this operation.

Attack Path

  1. An attacker submits an optimize_content request with a crafted keyword such as (a+)+$.
  2. The attacker supplies content containing a long sequence of a characters followed by a nonmatching character, such as aaaaaaaa...!.
  3. index.js forwards the content and keyword array to SEOEngine.optimizeContent().
  4. The content analyzer converts the attacker-controlled keyword into a regular expression at src/content-analyzer.js:263.
  5. Matching the expression ...[truncated 939 chars]
Remediation
View remediation

Remediation Suggestions

Treat keywords as literal text rather than regular-expression source. Escape all regular-expression metacharacters before constructing a RegExp:

javascript
function escapeRegExp(value) {
  return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}

for (const keyword of keywords) {
  if (typeof keyword !== 'string' || keyword.length === 0) {
    continue;
  }

  const escapedKeyword = escapeRegExp(keyword.toLowerCase());
  const occurrences =
    (contentLower.match(new RegExp(escapedKeyword, 'g')) || []).length;
  const density =
    (occurrences / Math.max(this._countWords(content), 1)) * 100;
}

Prefer a literal string-counting implementation using indexOf() when regular-expression behavior is unnecessary. This eliminates regular-expression injection entirely.

Apply additional defense-in-depth controls:

  1. Validate that content is a string and keywords is an array of strings.
  2. Enforce maximum lengths for content and each keyword.
  3. Enforce a maximum number of keywords per request.
  4. Reject empty or excessively complex input before analysis.
  5. Apply request-level rate limits where the package is exposed through an API.
  6. Add regression tests using malformed patterns such as [ and pathological patterns such as (a+)+$, verifying that they are processed as literal text.
  7. For high-volume services, isolate CPU-intensive analysis in worker threads or separate processes with execution deadlines.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (18)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README advertises URL analysis, ranking tracking, keyword research, and content optimization features but does not disclose whether submitted URLs, page content, keywords, or domain data are transmitted to third-party services. This can mislead users into providing potentially sensitive marketing or unpublished content data without informed consent, creating privacy, confidentiality, and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents all user-facing instructions and examples exclusively in Chinese, which effectively forces a specific language without user opt-in. There is no note that the skill is region-specific or that other languages are supported on request.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example trigger "给我内容优化建议" is generic and lacks domain constraints tying it specifically to SEO content optimization. This overlaps with common conversational requests and may cause the skill to activate in situations outside its intended scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The phrase "优化内部链接结构" is a broad instruction that could appear in ordinary SEO discussion without clearly indicating invocation boundaries. The file does not provide negative examples or contextual constraints to distinguish activation from general conversation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This manifest presents the skill entirely in Chinese in user-facing fields such as description and features, with no indication that the skill is region-specific or that users can opt into another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s natural-language descriptions are written exclusively in Chinese (for example, the title and description), with no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking context. Under the stated policy, forcing a specific language without user opt-in is a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description at L04 is entirely in Chinese and presents the skill as a general-purpose SEO engine, but there is no indication that the skill is China-specific or that users can choose their language/locale. For a broadly named package, this creates a natural-language policy concern because it implicitly enforces one language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JavaScript file contains user-facing natural-language descriptions and suggestion text entirely in Chinese, such as the module description and later recommendation strings. Because the skill does not offer any language selection or document a justified locale restriction, it appears to force a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation for analyze states it accepts either article text or a URL, and analyze() correctly fetches remote content when given a URL. However, getOptimizationSuggestions() later passes the original content argument into _analyzeKeywordUsage() instead of the fetched text, so URL inputs are not analyzed consistently for keyword usage as the documentation implies.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This JavaScript file contains natural-language comments and recommendation text entirely in Chinese, including user-facing strings returned by methods such as anchor-text recommendations and analysis actions. Under the stated policy, forcing a specific language without user opt-in is a locale/language policy violation unless the constraint is documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file’s natural-language comments, generated keyword patterns, and term lists are all written specifically in Chinese, indicating the skill is designed to operate in a single language/locale by default. There is no visible user opt-in, language selection, or documentation justifying this locale restriction as region-specific behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains natural-language content that forces a specific language/locale for documentation and likely downstream outputs. Under the policy, hard-coding a language without offering user choice or documenting a justified locale constraint is a violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code documents and presents itself as tracking real keyword rankings, but _getRanking returns randomized simulated data instead of actual retrieval results. This can mislead downstream users, reports, or automated decisions into trusting fabricated SEO intelligence, creating integrity and business-risk issues even though it is not a direct code-execution flaw.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JavaScript file contains natural-language comments and output strings exclusively in Chinese, including titles and recommendation text returned to callers. Under the policy rule, forcing a specific language without opt-in or documented regional scope is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's user-visible strings, test descriptions, and status messages are entirely in Chinese, with no indication that the language is optional or configurable. The policy explicitly flags language/locale constraints when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

SQP-3 applies to natural-language policy violations in all file types, including markdown. The document effectively forces a single language/locale experience for users by presenting all instructions and descriptions in Chinese, with no opt-in, alternative language, or documented region-specific justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The invocation "生成 SEO 排名报告" does not specify what site, keywords, or data source the report applies to. Without constraints or examples, the activation condition is ambiguous and may be interpreted too broadly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file’s natural-language comments and descriptions are written entirely in Chinese, including the module description and parameter documentation, with no indication that language choice is configurable or user-selected. This can violate a language/locale policy when skills are expected to avoid forcing a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.