Back to skill

Security audit

Skill Amazon Listing Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the advertised Amazon image workflow, but it exposes a public unauthenticated local server and can modify live Amazon listings, creating risks users should review before installing.

Install only if you are comfortable giving the scripts SP-API access to live listings and running them in a locked-down environment. Use least-privilege Amazon credentials, test on a single SKU first, avoid exposing the built-in HTTP server to the internet, and prefer serving images through controlled signed object-storage URLs instead of the included unauthenticated local server.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/push_images.js:40
Finding

Public HTTP Server Permits Path Traversal and Arbitrary File Disclosure

Content
View full analysis
{ const filePath = path.join(dir, req.url.replace(/^\//, '')); if (fs.existsSync(filePath)) { res.writeHead(200, { 'Content-Type': 'image/jpeg' }); fs.createReadStream(filePath).pipe(res); } else { res.writeHead(404); res.end(); } }); server.listen(port, '0.0.0.0'); return server; } ``` ### Technical Analysis The HTTP request path is passed directly to `path.join()` without canonicalizing the final path and verifying that it remains inside the intended image directory. Traversal components such as `../` can therefore cause `filePath` to resolve outside `dir`. The implementation also: - Binds the server to `0.0.0.0`, exposing it on every available network interface. - Does not require authentication or an unguessable access token. - Does not restrict responses to generated `*_fixed.jpg` files. - Uses `fs.existsSync()` without confirming that the target is a permitted regular file. - Assigns an image MIME type to every returned file, but this does not prevent the underlying contents from being disclosed. The server remains available for 15 minutes after listing updates are submitted, creating a meaningful exploitation window on any host whose configured port is publicly reachable. ### Attack Path 1. An operator starts `push_images.js` on a host with the selected port exposed. 2. The server listens publicly on `0.0.0.0`, normally using port 8899. 3. A remote attacker discovers or already knows the host and port. 4. The attacker sends a request containing traversal components, such as a path targeting `../amazon-sp-api.json`. The attacker can use a client that preserves traversal components if an inte ...[truncated 1049 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/audit.js:37
Finding

Unvalidated Listing Image URLs Enable Server-Side Request Forgery and Resource Exhaustion

Content
View full analysis
r.arrayBuffer()); const bytes = new Uint8Array(buf); // JPEG SOF0 marker for (let i = 0; i < bytes.length - 8; i++) { if (bytes[i] === 0xFF && (bytes[i+1] === 0xC0 || bytes[i+1] === 0xC2)) { return { w: (bytes[i+7] << 8) | bytes[i+8], h: (bytes[i+5] << 8) | bytes[i+6] }; } } } catch (e) { return null; } return null; } ``` The URL passed to this function originates from a listing attribute: ```javascript const url = images[0]?.media_location; if (!url) continue; const dims = await getImageDimensions(url); if (!dims) continue; ``` ### Technical Analysis The application performs outbound `HEAD` and `GET` requests to the listing-provided `media_location` value without validating: - The URL scheme. - The destination hostname. - Whether DNS resolves to a loopback, private, link-local, or otherwise sensitive IP address. - Redirect destinations. - Response content type. - Maximum response size. - Request duration. A listing image attribute that has been modified by a malicious user, compromised seller account, or another integration can consequently direct the audit host to make requests to internal services. Redirects may also permit an initially acceptable public URL to reach a prohibited internal address. The fallback request calls `arrayBuffer()` and buffers the complete response in memory. A malicious or unexpectedly large response can th ...[truncated 1789 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding

Unpinned Registry Dependencies Create a Mutable Software Supply Chain

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This mismatch is more concerning because it hides a materially relevant behavior: the skill documentation mentions spinning up a publicly accessible local HTTP server, but the overall description does not foreground that exposure. Undeclared network-serving behavior can cause users to expose product images or other reachable local content without appreciating the security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This mismatch is more concerning because it hides a materially relevant behavior: the skill documentation mentions spinning up a publicly accessible local HTTP server, but the overall description does not foreground that exposure. Undeclared network-serving behavior can cause users to expose product images or other reachable local content without appreciating the security implications.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This mismatch is more concerning because it hides a materially relevant behavior: the skill documentation mentions spinning up a publicly accessible local HTTP server, but the overall description does not foreground that exposure. Undeclared network-serving behavior can cause users to expose product images or other reachable local content without appreciating the security implications.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `audit.js` — Detect non-square images

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `audit.js` — Detect non-square images

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `audit.js` — Detect non-square images

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `audit.js` — Detect non-square images

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `audit.js` — Detect non-square images

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `push_images.js` — Upload fixed images to Amazon

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `push_images.js` — Upload fixed images to Amazon

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `push_images.js` — Upload fixed images to Amazon

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README promotes a workflow that automatically modifies live Amazon listings and temporarily exposes corrected images over a public HTTP endpoint, but it does not clearly warn users about the operational and security risks. Publicly serving listing assets can leak unpublished or proprietary product images, and automatic push behavior can cause unintended live catalog changes if run against the wrong account, marketplace, or report.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that require access to environment variables, local files, and the network, but it does not declare any explicit tool scope or permission boundaries. That creates an avoidable trust gap: an operator may invoke the skill without understanding that it reads credential files, accesses local image directories, and communicates externally to Amazon and a temporary public HTTP endpoint.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation language is broad and implies the skill can automatically detect, fix, and push updates across listings with minimal constraint. In a live Amazon seller context, vague triggers can lead to over-application, accidental bulk changes, or execution against the wrong account or listing set.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation promotes direct pushes to live Amazon listings but does not clearly warn that the action modifies production seller data. In this context, omission of a live-change warning is dangerous because users may treat the skill as a harmless audit tool when it can actually alter public listing assets at scale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation states that a local HTTP server is exposed on a public port so Amazon can crawl uploaded images, but it does not prominently warn about the security consequences of making local content publicly reachable. Exposing a temporary public server can leak proprietary product images, enable unintended access if directory scoping is weak, and increase attack surface on the host running the skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented fix_title.js script expands the skill from image maintenance into direct modification of listing metadata, but that capability is not reflected in the manifest description. Hidden or under-declared write actions against live commerce listings increase the chance of unintended high-impact changes and weaken informed consent for using the skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code and comments imply images are 'pushed via SP-API,' but the actual mechanism is to expose files over public HTTP for later crawling. This mismatch is security-relevant because users may supply credentials and run the tool without realizing it opens network exposure on their host and publishes product media externally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script opens a public HTTP server on 0.0.0.0 and serves local image files so Amazon can fetch them, which creates unintended external exposure of locally stored assets. In this skill context, the risk is higher because the advertised behavior is a direct SP-API push, while the real implementation requires temporary public hosting that may expose listing images, filenames, and local network availability without clear user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code loads Amazon SP-API secrets such as refresh tokens and client credentials from a path derived from an environment variable and uses them to authenticate API calls. Although the file header describes the script's purpose, it does not disclose that sensitive credentials will be read from disk or environment configuration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs external network activity and binds a publicly reachable HTTP server without an explicit warning or consent step. In this skill's context, that makes the behavior more dangerous because operators may expect an API-only listing update tool, not one that exposes local content and network presence to the internet.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script calls an external IP discovery service to learn the machine's public IP and then uses it to expose a reachable image endpoint. This leaks environment/network metadata to a third party and facilitates inbound access to the operator's machine, which is unnecessary if a safer hosting method is used.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access, suspicious.exposed_secret_literal

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/audit.js:16

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/push_images.js:17

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/audit.js:25

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/push_images.js:26