#5098·rss-bridge

BooruprojectBridge: 通过未验证的 'i' 参数调用 SSRF,绕过原本仅限于 booru.org 的主机限制

作者: router0mail创建于 2026年9月20日更新于 2026年9月20日

// bridges/BooruprojectBridge.php const PARAMETERS = [ 'global' => [ 'p' => [ 'name' => 'page', 'defaultValue' => 0, 'type' => 'number' ], 't' => [ 'name' => 'tags', 'required' => true, 'exampleValue' => 'tagme', ... ] ], 'Booru subdomain (subdomain.booru.org)' => [ 'i' => [ 'name' => 'Subdomain', 'required' => true, 'exampleValue' => 'rm' // no 'type' -> defaults to 'text' // no 'pattern' -> no format restriction at all ] ] ]; ... protected function getURI() { if (!is_null($this->getInput('i'))) { return 'https://' . $this->getInput('i') . '.booru.org/'; // line 63 } ... }


```php
// bridges/DanbooruBridge.php
protected function getFullURI()
{
    return $this->getURI()
    . 'posts?&page=' . $this->getInput('p')
    . '&tags=' . urlencode($this->getInput('t'));
}
public function collectData()
{
    $html = getSimpleHTMLDOMCached($this->getFullURI());   // fetches the URL server-side
    ...
}
`lib/ParameterValidator.php`'s `validateTextValue()` falls back to bare `filter_var($value)` (no filter constant = no-op passthrough) when no `pattern` is set for a `text`-type parameter -- confirmed via standalone PHP: `filter_var("169.254.169.254/latest/meta-data/")` returns the string unmodified.
Because `i` is concatenated directly before the fixed `.booru.org/` suffix, a `/` in the attacker's input terminates the intended hostname early. Everything after that `/` (including the literal `.booru.org/` suffix and the rest of the query string) becomes part of the **path** on the attacker-chosen host instead of the hostname.

内容来源: RSS-Bridge/rss-bridge