| Title | KARASZI IstvanのTmpにおける複数の脆弱性 |
|---|---|
| Summary | 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でこの脆弱性は修正されました。 |
| Possible impacts | ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアの一部が停止する可能性があります。 |
| Solution | ベンダ情報を参照して適切な対策を実施してください。 |
| Publication Date | June 11, 2026, midnight |
| Registration Date | June 16, 2026, 1:36 p.m. |
| Last Update | June 16, 2026, 1:36 p.m. |
| CVSS3.0 : 重要 | |
| Score | 8.2 |
|---|---|
| Vector | 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 | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年06月16日] 掲載 |
June 16, 2026, 1:36 p.m. |
| Summary | 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. |
|---|---|
| Publication Date | June 12, 2026, 2:16 a.m. |
| Registration Date | June 12, 2026, 4:18 a.m. |
| Last Update | June 15, 2026, 9:52 p.m. |
| Configuration1 | or higher | or less | more than | less than | |
| cpe:2.3:a:raszi:tmp:0.2.6:*:*:*:*:node.js:*:* | |||||