WR 株式会社WR 松戸のホームページ制作・社内システム・IT相談

株式会社WR

千葉県松戸市
松戸・柏・市川・流山・船橋 対応

ホーム›脆弱性情報›Node.js›CVE-2026-88038

警告 CVSS 4.8 Node.js CVE-2026-88038 公表 2026年9月10日

Node.jsのcookiesに属性注入の脆弱性

Node.js — CVE-2026-88038

自分のサイトが該当するか無料診断 → 原文を見る(NVD(米国 脆弱性データベース))↗

どんな問題か

Node.jsのcookiesライブラリで、cookieの送り先やパスの値のチェックが甘く、細工された値をそのまま使うと余分な設定を混ぜ込めます。これにより、サイトが付けるcookieの安全設定を弱められるおそれがあります。

放置するとどうなるか

ログイン状態の保護が弱まり、セキュリティ設定をすり抜けられる可能性があります。結果として、なりすましや情報漏えいの足がかりになることがあります。

今すぐやること

cookies 0.9.2へ更新してください。domainやpathには、外部入力をそのまま使わず、固定値を設定してください。Koaなど利用中のアプリがあれば、保守会社にも確認しましょう。

自分のサイトが該当するかの確認手順

  1. お使いのサーバー・プログラムに Node.js が使われているか、制作会社・保守会社・サーバー会社に確認します(管理画面やサーバーのバージョン表示でも分かります)。
  2. バージョンが「0.9.2より前のcookies」に当てはまるか確認します。
  3. 当てはまる場合は、修正版へのアップデートを依頼します。レンタルサーバーの場合はサーバー会社側で対応済みのこともあるので、お知らせを確認してください。
原文(英語)を表示
cookies is a Node.js library for reading and writing HTTP cookies, used by Koa via ctx.cookies. In versions before 0.9.2 the library validates the cookie name and value against character sets that reject the semicolon separator, but the domain and path options are checked only against a permissive RFC 7230 field-content matcher that allows semicolons, and both are written into the Set-Cookie header unescaped. An application that passes untrusted or request-derived data into the domain or path option can therefore inject additional cookie attributes, overriding SameSite, Secure, HttpOnly, or Domain on the cookies the application issues. This is a Set-Cookie attribute injection issue (CWE-74). The issue is fixed in cookies 0.9.2, which validates domain and path against RFC 6265 character sets. As a workaround, keep domain and path application-set rather than derived from untrusted input.

※ 解説は NVD(米国 脆弱性データベース) の公表内容をもとにAIが生成しています。対象バージョン・修正版などの正確な情報は、必ず原文をご確認ください。

無料で相談する →