<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Thu, 29 Oct 2026 20:11:56 +0000</lastBuildDate>
    <item>
      <title>GHSA-gg6h-894w-4m9c — RE2JS: Quadratic-time denial of service in re2js lookbehind matching</title>
      <link>https://db.gcve.eu/vuln/ghsa-gg6h-894w-4m9c</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: re2js&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;Using the opt-in `LOOKBEHINDS` flag together with any repeated-matching API
(`matcher().find()` in a loop, `matchAll()`, `split()`, `matcher().replaceAll()`)
causes quadratic-time (Θ(n²)) matching, contradicting the library&amp;#39;s own
&amp;#34;linear time matching&amp;#34; guarantee. A single call with a 16,000-character input
takes **36.7–38.7 seconds of CPU**.&lt;/p&gt;
&lt;p&gt;### Description&lt;/p&gt;
&lt;p&gt;#### Root cause&lt;/p&gt;
&lt;p&gt;In `build/index.cjs`, `Machine.match`:&lt;/p&gt;
&lt;p&gt;```js
let currentPos = this.prog.numLb &amp;gt; 0 ? 0 : pos;   // ~line 1907
...
if (this.ncap === 0 &amp;amp;&amp;amp; this.matched) break;        // ~line 1953
```&lt;/p&gt;
&lt;p&gt;Any pattern containing a lookbehind sets `prog.numLb &amp;gt; 0`, which forces the
scan to **always restart at offset 0**, regardless of the requested start
position — the lookbehind automaton is re-seeded and the whole input is
re-walked on every single `find()` call. The early-exit optimization that
would otherwise stop at the first match only fires when `ncap === 0`, but
every `Matcher`-based API (`find`/`matchAll`/`split`/`replaceAll`) always
requests `ncap = 2` (one capture group slot) **even for a captureless
lookbehind pattern** — so the early exit never triggers through those APIs,
and the scan continues to the end of the input on every find.&lt;/p&gt;
&lt;p&gt;A find-loop over *k* matches in an *n*-character string therefore costs
*k* × Θ(*n*); for dense matches *k* ∝ *n*, giving **Θ(n²)** total.&lt;/p&gt;
&lt;p&gt;#### Isolating control&lt;/p&gt;
&lt;p&gt;Identical find-loop, identical input sizes, same 2-character literal pattern
*shape* — but **without** the…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: re2js&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;Using the opt-in `LOOKBEHINDS` flag together with any repeated-matching API
(`matcher().find()` in a loop, `matchAll()`, `split()`, `matcher().replaceAll()`)
causes quadratic-time (Θ(n²)) matching, contradicting the library&amp;#39;s own
&amp;#34;linear time matching&amp;#34; guarantee. A single call with a 16,000-character input
takes **36.7–38.7 seconds of CPU**.&lt;/p&gt;
&lt;p&gt;### Description&lt;/p&gt;
&lt;p&gt;#### Root cause&lt;/p&gt;
&lt;p&gt;In `build/index.cjs`, `Machine.match`:&lt;/p&gt;
&lt;p&gt;```js
let currentPos = this.prog.numLb &amp;gt; 0 ? 0 : pos;   // ~line 1907
...
if (this.ncap === 0 &amp;amp;&amp;amp; this.matched) break;        // ~line 1953
```&lt;/p&gt;
&lt;p&gt;Any pattern containing a lookbehind sets `prog.numLb &amp;gt; 0`, which forces the
scan to **always restart at offset 0**, regardless of the requested start
position — the lookbehind automaton is re-seeded and the whole input is
re-walked on every single `find()` call. The early-exit optimization that
would otherwise stop at the first match only fires when `ncap === 0`, but
every `Matcher`-based API (`find`/`matchAll`/`split`/`replaceAll`) always
requests `ncap = 2` (one capture group slot) **even for a captureless
lookbehind pattern** — so the early exit never triggers through those APIs,
and the scan continues to the end of the input on every find.&lt;/p&gt;
&lt;p&gt;A find-loop over *k* matches in an *n*-character string therefore costs
*k* × Θ(*n*); for dense matches *k* ∝ *n*, giving **Θ(n²)** total.&lt;/p&gt;
&lt;p&gt;#### Isolating control&lt;/p&gt;
&lt;p&gt;Identical find-loop, identical input sizes, same 2-character literal pattern
*shape* — but **without** the…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-gg6h-894w-4m9c</guid>
    </item>
  </channel>
</rss>
