提交 #1060145: https://github.com/nliautaud/pico-content-editor pico-content-editor 02d5ad6c820c5050c542ab9505819b5e0a0ba1af Cross Site Scripting信息

标题https://github.com/nliautaud/pico-content-editor pico-content-editor 02d5ad6c820c5050c542ab9505819b5e0a0ba1af Cross Site Scripting
描述Summary: When base_url is left in automatic mode (base_url: ~), Pico CMS uses X-Forwarded-Host, X-Forwarded-Proto, and X-Forwarded-Port from any HTTP requester without verifying that the request came from a trusted proxy. The supplied values are used to construct absolute canonical, stylesheet, image, and JavaScript URLs in the HTML response. Vulnerable component: lib/Pico.php::getBaseUrl(), lines 2188-2235. Affected file and parameter: lib/Pico.php — HTTP_X_FORWARDED_HOST server variable. Technical description: getBaseUrl() checks HTTP_X_FORWARDED_HOST before HTTP_HOST and copies the value directly into the base URL without consulting a trusted-proxy allowlist or validating the resolved host. The derived URL propagates into every theme variable (base_url, theme_url, plugins_url, assets_url) and is rendered into link href and script src attributes. Vulnerable code: host=′localhost′;if(!empty(host=′localhost′;if(!empty(_SERVER['HTTP_X_FORWARDED_HOST'])) { host=host=_SERVER['HTTP_X_FORWARDED_HOST']; // no proxy authentication } elseif (!empty( host = _SERVER['HTTP_HOST']; } this->config['base_url'] = protocol.′://′.protocol.′://′.host . $basePath; Steps to reproduce: Deploy Pico CMS with default configuration (base_url: ~). Start a controlled HTTP server on 127.0.0.1:8888 serving JavaScript from any path. Send: curl -H 'X-Forwarded-Host: 127.0.0.1:8888' -H 'X-Forwarded-Proto: http' http://pico-host/ Observe that the response contains <script src="http://127.0.0.1:8888/themes/default/js/pico.js">. Render the response in a browser — the controlled JavaScript executes. For cache-poisoning impact: confirm a shared intermediary caches the response without varying on X-Forwarded-Host, then request the canonical URL from a different client. Impact: Direct impact is unauthenticated control of hosts in absolute resource URLs. Under the conditional cache chain (shared cache, compatible key configuration, victim loads cached response, browser policy permits the resource), attacker-hosted JavaScript executes in the document origin of the affected Pico site, allowing content modification, same-origin requests, and access to browser-visible data.
来源⚠️ https://github.com/vinniboy021-blip/Advisory/blob/main/pico-xfh-cache-poisoning-xss.md
用户
 vinniboy021 (UID 100165)
提交2026-10-27 18時12分 (1 月前)
管理2026-11-25 16時56分 (29 days later)
状态重复
VulDB条目387391 [picocms Pico 直到 2.1.4 Base URL lib/Pico.php Pico::getBaseUrl 权限提升]
积分0

Might our Artificial Intelligence support you?

Check our Alexa App!