T09 · Insecure Skill Coding Practices
- Location
scripts/marktplaats-place-probe.js:395- Finding
Authentication Material Can Be Forwarded to Arbitrary Network Destinations
- Content
View full analysis
line.trim()).filter(Boolean); const cookieLine = lines.find((line) => !line.startsWith('#') && line.includes('\t')); if (!cookieLine) return content; const parts = cookieLine.split('\t'); const name = parts.at(-2); const value = parts.at(-1); return `${name}=${value}`; } async function curlProbe(options) { if (!options.url) { throw new Error('curl mode requires --url'); } const userAgent = resolveUserAgent(options.userAgent); const headers = new Headers({ 'User-Agent': userAgent, Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', ...Object.fromEntries(options.header.map((value) => { const idx = value.indexOf(':'); if (idx === -1) return [value, '']; return [value.slice(0, idx).trim(), value.slice(idx + 1).trim()]; })), }); const cookie = options.cookie ?? loadCookieFile(options.cookieFile); if (cookie) { headers.set('Cookie', cookie); } const response = await fetch(options.url, { redirect: 'follow', headers, }); ``` ### Technical Analysis The command accepts an unrestricted destination through `--url` while also accepting a raw cookie, a cookie-export file, and arbitrary headers. It then sends those values to the supplied destination wit ...[truncated 1420 chars]- Remediation
View remediation
