| タイトル | KARASZI IstvanのTmpにおける複数の脆弱性 |
|---|---|
| 概要 | tmpはnode.js用の一時ファイルおよびディレクトリ作成ツールです。バージョン0.2.6では、tmpに追加された_assertPathガードは文字列値に含まれる部分文字列「..」のみを拒否します。しかし、prefix、postfix、またはtemplateが非文字列値(配列、バッファ、またはincludes('..')が偽を返す任意のオブジェクト)として供給された場合、このガードを回避できます。その文字列化は依然として"../"を含みます。この値は_generateTmpName内のArray.prototype.joinやString強制変換、およびpath.join(tmpDir, opts.dir, name)を通過し、最終的にtmpdirを逸脱するパスを生成します。これにより、ホストプロセスの権限で攻撃者制御下の場所にファイルまたはディレクトリを作成される可能性があります。この脆弱性は、信頼できないリクエストデータ(一般的なパターンはJSONボディフィールドやqs解析されたブラケット配列クエリ文字列例:?prefix[]=...)を明示的な型強制なしにtmp.file、tmp.fileSync、tmp.dir、tmp.dirSync、tmp.tmpName、またはtmp.tmpNameSyncに渡す任意のアプリケーションに影響します。バージョン0.2.7でこの脆弱性は修正されました。 |
| 想定される影響 | ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアの一部が停止する可能性があります。 |
| 対策 | ベンダ情報を参照して適切な対策を実施してください。 |
| 公表日 | 2026年6月11日0:00 |
| 登録日 | 2026年6月16日13:36 |
| 最終更新日 | 2026年6月16日13:36 |
| CVSS3.0 : 重要 | |
| スコア | 8.2 |
|---|---|
| ベクター | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L |
| KARASZI Istvan |
| Tmp 0.2.6 |
| No | 変更内容 | 変更日 |
|---|---|---|
| 1 | [2026年06月16日] 掲載 |
2026年6月16日13:36 |
| 概要 | tmp is a temporary file and directory creator for node.js. In version 0.2.6, the _assertPath guard added to tmp rejects only string values that contain the substring ... It is bypassed when prefix, postfix, or template is supplied as a non-string value (Array, Buffer, or any object) whose includes('..') returns falsy but whose stringification still contains ../. The value flows through Array.prototype.join/String coercion inside _generateTmpName and path.join(tmpDir, opts.dir, name), producing a final path that escapes tmpdir and creates a file or directory at an attacker-controlled location with the host process's privileges. This affects any application that forwards untrusted request data (a common pattern is JSON body fields or qs-parsed bracket-array query strings such as ?prefix[]=...) into tmp.file, tmp.fileSync, tmp.dir, tmp.dirSync, tmp.tmpName, or tmp.tmpNameSync without explicit type coercion. This vulnerability is fixed in 0.2.7. |
|---|---|
| 公表日 | 2026年6月12日2:16 |
| 登録日 | 2026年6月12日4:18 |
| 最終更新日 | 2026年6月15日21:52 |
| 構成1 | 以上 | 以下 | より上 | 未満 | |
| cpe:2.3:a:raszi:tmp:0.2.6:*:*:*:*:node.js:*:* | |||||