Skip to content
High 8.7

Effectの脆弱性、細工された文字列で処理が長時間止まるおそれ

CVE-2026-121707 First seen on SecPulse

Summary

TypeScriptフレームワーク「Effect」の3.22.1より前のバージョンに、正規表現の処理負荷が急増する脆弱性(CVE-2026-121707)が見つかりました。Schema.TemplateLiteralで作られた検証で、条件に合わない文字列を受け取ると、JavaScriptのイベントループが塞がれるおそれがあります。修正版の3.22.1で対応できるため、利用中のバージョンを確認して更新してください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

TypeScriptフレームワーク「Effect」の3.22.1より前のバージョンに、正規表現の処理負荷が急増する脆弱性(CVE-2026-121707)が見つかりました。Schema.TemplateLiteralで作られた検証で、条件に合わない文字列を受け取ると、JavaScriptのイベントループが塞がれるおそれがあります。修正版の3.22.1で対応できるため、利用中のバージョンを確認して更新してください。

Affected packages

PackageAffected → Fixed
Effect-TSeffect —
npmeffect
< 3.22.1→ 3.22.1
Original description The description as published by the source.

Impact

Schema.TemplateLiteral compiles each Schema.String span to the lazy wildcard [\s\S]*? and decodes input by running the resulting regular expression against it. When a template has two or more Schema.String spans, for example:

Schema.TemplateLiteral(Schema.String, ":", Schema.String, ":", Schema.String, "X")

the regex contains several ambiguous wildcards. A non-matching input makes the backtracking engine try combinations across all of them, so matching time grows cubically with input length. A 5,000-character string of : characters blocks the event loop for about 15 seconds.

Applications that decode untrusted input with such a schema are affected. That includes Schema.decodeUnknown, Schema.decodeUnknownSync and Schema.is, and anything built on them, such as HttpApi request payloads and @effect/rpc payloads.

Patches

Fixed in effect@3.22.1 (#6761). Template literals whose spans are all Schema.String are now matched with a linear left-to-right scan instead of a regular expression.

Workarounds

If you can't upgrade, check the input length before the template literal runs. Adding Schema.maxLength with .pipe doesn't help, because the filter runs after the regex. Put the length check on the input side instead:

Schema.compose(Schema.String.pipe(Schema.maxLength(256)), MyTemplateLiteral)

Rejecting oversized request bodies before they reach the schema also works.

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

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details