| عنوان | 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) |
|---|
| ارسال | 27/10/2026 06:12 PM (1 شهر منذ) |
|---|
| الاعتدال | 25/11/2026 04:56 PM (29 days later) |
|---|
| الحالة | مكرر |
|---|
| إدخال VulDB | 387391 [picocms Pico حتى 2.1.4 Base URL lib/Pico.php Pico::getBaseUrl تجاوز الصلاحيات] |
|---|
| النقاط | 0 |
|---|