T03 · Remote Payload Retrieval and Execution
- Location
scripts/search.mjs:75- Finding
Remote-Controlled Dynamic Module Execution Through API Response Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does the Tavily search it advertises, but its search script lets an API response choose code to import and run.
Review before installing. The basic Tavily search/extract behavior is understandable, but the search script should be fixed so formatter selection comes only from a local allowlist and never from Tavily response metadata. Users should also understand that their search queries, requested URLs, and Tavily API key are sent to Tavily.
scripts/search.mjs:75Remote-Controlled Dynamic Module Execution Through API Response Metadata
The script lets the remote Tavily API response control formatFile, then dynamically imports that module. new URL(formatFile, import.meta.url) only resolves the path; it does not restrict it to a safe local allowlist, so a malicious or compromised response could trigger loading unintended local files or even remote modules depending on runtime support, resulting in arbitrary code execution in the agent context.
The skill invokes Node.js scripts that perform external web search and URL extraction via the Tavily API, which are network-capable operations, but the manifest does not declare any explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can allow the skill to make outbound requests without clear policy visibility, increasing the risk of unintended data exfiltration or misuse if the scripts are modified or abused.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
process.exit(1);
}
const resp = await fetch("https://api.tavily-search.com/extract", {
method: "POST",
headers: {
"Content-Type": "application/json",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
process.exit(1);
}
const resp = await fetch("https://api.tavily-search.com/extract", {
method: "POST",
headers: {
"Content-Type": "application/json",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
process.exit(1);
}
const resp = await fetch("https://api.tavily-search.com/extract", {
method: "POST",
headers: {
"Content-Type": "application/json",
This code sends user-provided URLs and the TAVILY_API_KEY to an external service via a POST request. While the script name implies extraction, there is no confirmation prompt, comment, or user-facing warning explaining that input URLs and credentials will be transmitted off-system.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
body.days = days;
}
const resp = await fetch("https://api.tavily-search.com/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
This code sends the user's query and the API key to Tavily via an HTTP POST request, which is a network operation involving user/system data. While the script name suggests search behavior, there is no confirmation prompt, user-facing warning, or explanatory comment/docstring disclosing that input is sent to a third-party service.
The comment asserts that URL normalization makes formatFile safe, but the code still imports a module path influenced by untrusted API data. This is dangerous because it can mislead reviewers into overlooking the real risk: normalization changes syntax, not trust, and does not prevent loading attacker-selected code locations.
No suspicious patterns detected.