T09 · Insecure Skill Coding Practices
- Location
scripts/_lib.js:89- Finding
Server-Side Request Forgery Through Unrestricted RSS Feed URLs
- Content
View full analysis
s.url === url)) { return { success: false, error: '该订阅源已存在' }; } const newSub = { id: generateId(), url, name: name || url, addedAt: new Date().toISOString(), lastFetchedAt: null }; subs.push(newSub); saveSubs(subs); return { success: true, message: '订阅源已添加', subscription: newSub }; } ``` `scripts/_lib.js:89-103`: ```js export async function fetchSubscriptions(targetId = null, format = 'markdown', notify = false, sendFn = null) { const subs = loadSubs(); const targets = targetId ? subs.filter(s => s.id === targetId) : subs; if (targets.length === 0) { return { success: false, error: '没有找到订阅源' }; } const config = loadConfig(); const parser = new Parser(); const results = []; for (const sub of targets) { try { const feed = await parser.parseURL(sub.url); ``` ### Technical Analysis The subscription URL comes directly from JSON input and is stored without validating its scheme, hostname, resolved address, port, or redirect destination. During a subsequent fetch, `rss-parser` passes that stored value to its HTTP retrieval mechanism. This creates an SSRF primitive because the requester can cause the Skill runtime to initiate connections to arbitrary destinations reachable from its network context. Potential targets include: - Loopback services such as `127.0.0.1` or `::1`. - Private network ranges. - Link-local addresses. - Cloud instance metadata services such as `169.254.169.254`. - Internal administrative applications or APIs unavailable to th ...[truncated 1552 chars]- Remediation
View remediation
