本文へ移動
English version →
高 8.6

happy-domで信頼できないHTMLの解析時に内部ネットワークへのサーバー側リクエストが発生する脆弱性

CVE-2026-118660 SecPulse初出

概要

happy-domでは、信頼できないHTMLを解析する際に、iframeやlinkタグのstylesheetに指定されたURLへサーバー側から自動的にリクエストが送られます。攻撃者が解析されるHTMLを用意できる場合、内部ネットワークやクラウドのエンドポイントへ接続させられ、返ってきた応答や認証情報が漏れるおそれがあります。影響するのは21.0.0より前のバージョンで、21.0.0に修正版が公開されています。アプリケーションでnpmの利用している場合は、21.0.0以降へ更新してください。

AI要約

外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

happy-domでは、信頼できないHTMLを解析する際に、iframeやlinkタグのstylesheetに指定されたURLへサーバー側から自動的にリクエストが送られます。攻撃者が解析されるHTMLを用意できる場合、内部ネットワークやクラウドのエンドポイントへ接続させられ、返ってきた応答や認証情報が漏れるおそれがあります。影響するのは21.0.0より前のバージョンで、21.0.0に修正版が公開されています。アプリケーションでnpmの利用している場合は、21.0.0以降へ更新してください。

影響パッケージ

種類パッケージ影響を受ける版直った版
capricorn86 happy-dom — —
npm happy-dom
21.0.0 未満
21.0.0
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

happy-dom v20.8.9 makes real server-side HTTP requests to arbitrary URLs when parsing HTML containing or elements. This behavior is enabled by default (disableIframePageLoading: false, disableCSSFileLoading: false). When an application uses happy-dom to parse untrusted HTML on the server side, an attacker can trigger Server-Side Request Forgery by embedding these elements.

Affected Versions

  • happy-dom <= 20.8.9 (latest)

Vulnerable Behavior

By default, happy-dom has:

  • disableIframePageLoading: false — iframes fetch their src URL via real HTTP requests
  • disableCSSFileLoading: false — `` stylesheets fetch their href URL via real HTTP requests

When untrusted HTML is parsed, these elements trigger real server-side HTTP requests to whatever URLs are specified. No special configuration or opt-in is needed.

Proof of Concept

Verified test (attacker server receives requests):

const http = require('http');
const { Window } = require('happy-dom');

// Start attacker server
const srv = http.createServer((req, res) => {
    console.log(`SSRF HIT: ${req.method} ${req.url}`);
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end('stolen');
});

srv.listen(9995, () => {
    // iframe SSRF — happy-dom makes a real GET request
    const win1 = new Window({ url: 'http://localhost' });
    win1.document.write('');

    // stylesheet SSRF — happy-dom makes a real GET request
    const win2 = new Window({ url: 'http://loc…

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のために Cookie を使います。株式会社Game のサイト共通の設定です。 詳しく