T09 · Insecure Skill Coding Practices
- Location
references/components/upload.md:41- Finding
Hardcoded Third-Party Endpoint Can Receive User-Selected Files
- Content
View full analysis
Vulnerability Details
File Location:
references/components/upload.md, lines 41, 108, 153, and 228
Vulnerability Type: Hardcoded external upload destination
Risk Level: MediumVulnerable Code
The same external endpoint appears in four copyable examples:
vue <el-upload v-model:file-list="fileList" class="upload-demo" action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :on-preview="handlePreview" :on-remove="handleRemove" :before-remove="beforeRemove" :limit="3" :on-exceed="handleExceed" >vue <el-upload ref="upload" class="upload-demo" action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" :limit="1" :on-exceed="handleExceed" :auto-upload="false" >vue <el-upload class="avatar-uploader" action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" >vue <el-upload v-model:file-list="fileList" action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" >Technical Analysis
The documentation presents directly reusable Element Plus upload examples whose
actionproperty points to a fixed endpoint operated outside the user's application. Element Plus submits selected file contents to the configuredactionURL.The examples at lines 41, 153, and 228 do not disable automatic uploading, so file selection can initiate transmission without a separate explicit submit action. The example at line 108 sets
auto-upload="false", but later transmits the selected file whenupload.value!.submit()is called.Although the endpoint appears to be intended as a demonstration service, the upload document does not place a warning next to these examples requiring replacement with an operator-controlled endpoint. The Skill also desc ...[truncated 1526 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace the external demonstration destination in every example with an application-relative placeholder:
vue <el-upload action="/api/upload" :auto-upload="false"> -
Add an explicit warning immediately above every upload example stating that developers must configure an endpoint they own and trust before selecting any file.
-
Default demonstrations to
:auto-upload="false"so file selection alone does not initiate network transmission. -
Require an explicit confirmation step before calling
submit()and display the resolved upload destination to the user. -
Avoid using real or sensitive files in demonstrations. Provide a generated sample fixture when a live upload demonstration is necessary.
-
For production deployments, enforce HTTPS, authentication, authorization, CSRF protections where applicable, request-size limits, server-side file-type and content validation, malware scanning, randomized storage names, and restrictive storage permissions.
-
Add an automated documentation check that rejects upload examples containing hardcoded third-party destinations unless they are clearly marked as non-production and protected against automatic submission.
-
