Back to skill

Security audit

Mofang Page Builder

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent as a Magicflu page builder, but its live proxy and credentialed scripts can expose or change real account data if used as written.

Review this skill carefully before installing. Use mock or offline import mode when possible, avoid production credentials, require HTTPS and a trusted BASE_URL, do not run proxy mode on shared networks, and fix the proxy binding/CORS and innerHTML rendering issues before using it with live Magicflu data.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/mock-jsonv2.mjs:90
Finding

Unauthenticated Credentialed Read/Write Proxy Exposed on All Network Interfaces

Content
View full analysis
{ console.log(`jsonv2 ${opts.mode} listening http://127.0.0.1:${opts.port}`); if (opts.mode === 'mock') { console.log(`data dir: ${opts.dir}`); } else { console.log(`upstream: ${normalizeBaseUrl(opts.bas ...[truncated 2401 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/lib/magicflu-session.mjs:74
Finding

Passwords, Cookies, and Bearer Tokens Can Be Sent over Plaintext HTTP or to an Unvalidated Destination

Content
View full analysis
\ --formId \ --out ./mock-data ``` ### Technical Analysis `normalizeBaseUrl` performs string trimming only. It does not parse the supplied URL, enforce HTTPS, restrict schemes, reject embedded credentials, or confirm that the destination is an intended Magicflu host. The scripts then send the user's account password to `${baseUrl}/magicflu/jwt`. Subsequent requests can send bearer tokens and session cookies to the same destination. The document ...[truncated 1865 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
examples/vanilla/list-page.html:87
Finding

Stored Cross-Site Scripting in Generated Same-Origin List Pages

Content
View full analysis
' + DISPLAY_COLUMNS.map(c => `${c.label}`).join('') + ''; tbody.innerHTML = entry.map(row => '' + DISPLAY_COLUMNS.map(c => { let val = row[c.name]; if (val && typeof val === 'object' && val.content) val = val.content; return `${val ?? '-'}`; }).join('') + '' ).join(''); } ``` The local-api-base variant contains the same sink: ```js tbody.innerHTML = entry.map(row => '' + DISPLAY_COLUMNS.map(c => { let val = row[c.name]; if (val && typeof val === 'object' && val.content) val = val.content; return `${val ?? '-'}`; }).join('') + '' ).join(''); ``` ### Technical Analysis Record values returned by the JSONv2 API are untrusted data. The templates interpolate those values directly into HTML strings and assign the result to `tbody.innerHTML`. No HTML encoding or sanitization is applied. Consequently, a record value containing markup is parsed as active DOM content rather than displayed as text. Event-handler attributes and other browser-supported execution mechanisms can therefore execute JavaScript. This is particularly serious because `list-page.html` is intended for same-origin publication on Magicflu. The Skill explicitly relies on the browser's same-origin session Cookie. Script executing through a malicious record consequently runs in the authenticated Magicflu origin. The configured column labels are normally developer-controlled, but they are also inserted with `innerHTML`; record values constitute the directly exploitab ...[truncated 1389 chars]
Remediation
View remediation
` and verify that they are rendered as literal text. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch-form-spec.mjs:244
Finding

Form Identifier Allows Filesystem Path Traversal Outside the Selected Output Directory

Content
View full analysis
{ const t = id.trim(); if (t) opts.formIds.push(t); }); } ``` ```js for (const formId of opts.formIds) { let data; if (opts.importJson) { const raw = readFileSync(resolve(process.cwd(), opts.importJson), 'utf8'); data = JSON.parse(raw); } else { data = await fetchFielddef(opts.baseUrl, opts.spaceId, formId, auth); } const dir = join(out, formId); ensureDir(dir); writeFileSync(join(dir, 'fielddef.json'), JSON.stringify(data, null, 2), 'utf8'); writeFileSync(join(dir, 'records.seed.json'), JSON.stringify([], null, 2), 'utf8'); manifest.forms.push({ formId, label: formLabelFromFielddef(data) }); } ``` ### Technical Analysis The `--formId` value is accepted as an arbitrary string and later used as a filesystem path component through `join(out, formId)`. The script does not enforce the expected UUID format, reject path separators, or verify that the resulting directory remains inside `out`. Node's path normalization processes `..` components. A value containing traversal segments can therefore cause `dir` to refer to a location outside the intended mock-data directory. In offline import mode, the attacker-controlled or erroneous identifier does not need to be accepted by a remote Magicflu service. The imported JSON is then written to `fielddef.json`, while `records.seed.json` is created or overwritten with an empty array. ### Attack Path 1. An attacker persuades a user or automation process to invoke the script with an offline import and a traversal-bearing form identifier. 2. The script accepts the identifier without validation. 3. `join(out, formId)` normalizes traversal components and produces ...[truncated 871 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is described as a page builder for Magicflu/Mofang CRUD pages, but the documented behavior includes broader site/file-management capabilities such as upload, edit, create, rename, delete, and editor integration. That scope expansion is dangerous because an agent or user may invoke the skill expecting code generation, while it can actually modify website content and file repositories in a live environment.

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 30)May include surrounding context.

md
Copy the whole `mofang-page-builder/` folder, not only `SKILL.md`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Run `scripts/fetch-form-spec.mjs`, or ask the user for an exported fielddef JSON and import it.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Run `scripts/fetch-form-spec.mjs`, or ask the user for an exported fielddef JSON and import it.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Run `scripts/fetch-form-spec.mjs`, or ask the user for an exported fielddef JSON and import it.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Run `scripts/fetch-form-spec.mjs`, or ask the user for an exported fielddef JSON and import it.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Run `scripts/fetch-form-spec.mjs`, or ask the user for an exported fielddef JSON and import it.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/mock-jsonv2.mjs --port 3847 --dir ./mock-data

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/mock-jsonv2.mjs --port 3847 --dir ./mock-data

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/deploy.mjs \

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Read `references/design.md`, `references/requirements.md`, and `references/filemanager.js` only when debugging implementation details.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Vanilla HTML+JS | `examples/vanilla/list-page.html` | Same-origin list page |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Vanilla HTML+JS | `examples/vanilla/list-page-with-apibase.html` | List page wired to local mock |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Vanilla HTML+JS | `examples/vanilla/form-page.html` | Create-record form |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/filemanager.js (reported line 533)May include surrounding context.

js
// Prompts for confirmation, then deletes the current item.
// Called by clicking the "Delete" button in detail views
// or choosing the "Delete contextual menu item in list views.
var deleteItem = function(data){
	var isDeleted = false;
	var msg = lg.confirmation_delete;

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

The code builds HTML by concatenating untrusted file/folder metadata from the connector response, then injects it with .html(result). If an attacker can control filenames, preview URLs, properties, or other returned fields, they can inject HTML/JavaScript and trigger DOM-based or stored XSS in the file manager UI, which is especially dangerous in an administrative file-management context.

Content

Scanner excerpt · references/filemanager.js (reported line 898)May include surrounding context.

js
}
		
		// Add the new markup to the DOM.
		$('#fileinfo').html(result);
		
		// Bind click events to create detail views and add
		// contextual menu options.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/pack-skill.mjs (reported line 45)May include surrounding context.

js
const tmpZip = join(tmpdir(), `mofang-skill-pack-${name}-${version}-${process.pid}.zip`);

const excludedDirs = new Set(['.git', 'node_modules', 'docs', 'publish', 'skillsbackup']);
const excludedFiles = new Set(['.env', '.DS_Store', 'tsconfig.json']);

function toZipPath(absPath) {
  return relative(skillRoot, absPath).split(sep).join('/');

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs use of environment variables containing usernames/passwords and multiple networked scripts, but it declares no explicit tool scope or permission boundaries. In an agent setting, that makes credential use and outbound requests implicit rather than user-gated, increasing the chance of unintended secret access or network actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly suggests using a script to pull form specifications from a real environment, but provides no warning about handling production-like metadata, credentials, tenant-specific schema details, or downstream reuse in local debugging. Even if only field definitions are fetched, this can normalize copying sensitive configuration out of a live environment into local files, increasing the risk of unintended disclosure or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This HTML/JS file submits user-entered form fields to a backend using fetch(), which transmits potentially sensitive user data over the network. Although the page has success/error messages, there is no visible disclosure before submission that clicking the button will send the data to a remote API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file provides a Vue component that posts user-entered form fields to an API endpoint via fetch, but the surrounding skill description only says to copy the component into a project and does not warn that submitting the form will transmit entered data to a backend service. For markdown files, omissions of warnings about behaviors affecting user data or privacy should be flagged.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document instructs users to obtain JWTs and cookies via a login endpoint and to reuse them in scripts, but it provides no guidance on secret handling, storage, redaction, or transport hygiene. In the context of a code-generation skill, this omission can lead generated code or operator workflows to hardcode credentials, log tokens, or mishandle session cookies, increasing the chance of credential theft and account compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

这是一个 markdown 文件,适用 SQP-2 的文档告警要求。该文档列出了创建、修改和删除记录等会直接影响用户数据的操作,尤其 DELETE 接口会造成数据变更或删除,但附近没有任何关于数据丢失、谨慎执行、确认机制或生产环境影响的提醒。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file defines the skill activation using a wide set of generic terms such as '表单', '记录', '列表', 'CRUD', and '发布等需求'. Those terms are common across many software tasks and the document does not provide exclusions or negative examples, making unintended invocation more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The design explicitly supports a proxy mode that forwards real traffic and preserves live write behavior, yet it does not require a clear warning or consent step before operations that can mutate production data. In a page-builder/debugging skill, this context makes the issue more dangerous because users may assume 'local debugging' is safe while the proxy can still create, modify, or delete real records.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/fetch-import-smoke.mjs:24

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/mock-jsonv2-smoke.mjs:49

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/upload-flow-smoke.mjs:86