CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-142592

CVE-2026-142592: Denial of Service via Multipart Charset Encoding Resolution in Rack

Alon Barad
Alon Barad
Software Engineer

Dec 4, 2026·13 min read·3 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can cause CPU and filesystem I/O exhaustion in Ruby web applications using Rack 3.0.0 through 3.1.23 and 3.2.0 through 3.2.8 by sending crafted multipart/form-data requests containing thousands of invalid charset directives. Upgrade to Rack 3.1.24 or 3.2.9 to resolve the issue.

CVE-2026-142592 is an uncontrolled resource consumption vulnerability (CWE-400) in Rack, the modular Ruby web server interface. In affected versions within the 3.1.x and 3.2.x branches, the multipart form-data parser directly passes untrusted charset parameters to Ruby's internal Encoding.find method without pre-validation or caching. Because Ruby's MRI runtime traverses the entire $LOAD_PATH searching for shared libraries whenever an unknown encoding is requested, an unauthenticated attacker can submit a multipart payload with thousands of invalid charset parameters to trigger millions of filesystem lookup operations, exhausting CPU and I/O resources and causing denial of service.

Vulnerability Overview

Rack serves as the foundational modular web server interface for the Ruby ecosystem, sitting between web servers (such as Puma, Unicorn, and Falcon) and web frameworks (such as Ruby on Rails and Sinatra). Among its core responsibilities, Rack parses incoming HTTP requests, including multipart/form-data payloads used for form submissions and file uploads. Because multipart parsing occurs early in the request lifecycle—often within Rack middleware or controller parameter parsing before authentication or authorization checks execute—the Rack::Multipart::Parser class represents an exposed, unauthenticated attack surface across almost all Ruby web deployments.

Tracked as CVE-2026-142592 (and GitHub Security Advisory GHSA-58mf-c3jj-277p), the vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption). The defect affects Rack versions >= 3.0.0, < 3.1.24 and >= 3.2.0, < 3.2.9. When processing multipart body parts, the parser extracts charset parameters from part-level Content-Type headers and filename* parameters (defined in RFC 5987 and RFC 2231) to assign the appropriate character encoding to the extracted string buffer.

In vulnerable versions of Rack 3.x, the parser validates and resolves each charset parameter by invoking Ruby's built-in Encoding.find method directly on the user-supplied string. The parser performs this action sequentially for every charset parameter present in a part header without limiting the number of parameters inspected, validating the string against registered encodings in memory, or caching previously failed lookups.

When Encoding.find receives an unrecognized encoding identifier, the Ruby MRI (CRuby) runtime attempts to dynamically load an external encoding definition from the filesystem by searching every directory in $LOAD_PATH. An unauthenticated remote attacker can exploit this interaction by transmitting a single HTTP POST request containing thousands of unique, nonexistent charset attributes. This forces the application worker process to perform millions of synchronous filesystem stat operations, blocking worker threads for tens of seconds and causing application-wide denial of service.

Root Cause Analysis

Understanding the mechanics of CVE-2026-142592 requires examining how the Ruby MRI runtime manages character encodings internally. Ruby maintains an in-memory registry of loaded encodings, which can be enumerated via Encoding.name_list. When an application calls Encoding.find(name), the runtime first checks this internal hash table. If the encoding name is found, the corresponding Encoding object is returned in $O(1)$ time with negligible computational overhead.

However, if the requested name does not exist in the in-memory table, Ruby MRI's internal load_encoding C function (defined in encoding.c) assumes the encoding may be provided by an external dynamically loadable shared object library following the naming convention enc/<name>.so (or .bundle / .dll depending on the platform). To locate this shared library, the Ruby runtime iterates sequentially through every directory path stored in the global $LOAD_PATH ($:) array and issues OS-level filesystem calls (stat or openat) to check for the file's existence. Only after checking every directory in $LOAD_PATH and failing to find the shared object does Ruby raise an ArgumentError: unknown encoding name exception.

In a standard Bundler-managed Ruby or Ruby on Rails application, each installed gem appends its lib directory (and any native extension directories) to $LOAD_PATH. Production applications routinely contain between 100 and 500+ entries in $LOAD_PATH. Consequently, a single call to Encoding.find with an invalid name triggers hundreds of synchronous filesystem checks, taking approximately 1 to 5 milliseconds depending on disk I/O performance and container overlay filesystem latency (such as OverlayFS in Docker or Kubernetes environments).

The root cause in Rack::Multipart::Parser lies in how tag_multipart_encoding and find_encoding process part headers. When tokenizing a part's Content-Type header (for example, Content-Type: text/plain; charset=a; charset=b; charset=c), Rack iterates over all semicolon-delimited parameters. For every parameter key matching charset, Rack invokes find_encoding(enc), which wraps Encoding.find(enc) in a begin ... rescue ArgumentError block that falls back to Encoding::BINARY. Because Rack 3.x silently catches the exception and continues iterating through subsequent parameters in the same header line, an attacker can chain thousands of invalid charset parameters within a single multipart section.

Additionally, the same code path contains a secondary flaw regarding the special encoding identifier "internal". In Ruby, calling Encoding.find("internal") returns the value of Encoding.default_internal. In most standard Ruby environments, Encoding.default_internal is not configured and defaults to nil. When a client supplies charset=internal, Encoding.find("internal") returns nil without raising an ArgumentError. The vulnerable find_encoding implementation returns nil to tag_multipart_encoding, which then executes body.force_encoding(nil), triggering an unhandled TypeError (no implicit conversion of nil into String) that aborts the request with an HTTP 500 error. Note that Rack 2.2.x is not affected by the resource exhaustion bug because it immediately aborts multipart parsing upon encountering the first unknown character set.

Code Analysis

In Rack versions 3.0.0 through 3.1.23 and 3.2.0 through 3.2.8, the vulnerable logic resides in lib/rack/multipart/parser.rb inside the Rack::Multipart::Parser class. When the parser finishes reading a part body, it calls tag_multipart_encoding to apply the character encoding declared in the part headers:

# Vulnerable implementation in lib/rack/multipart/parser.rb
def tag_multipart_encoding(filename, content_type, name, body)
  encoding = Encoding::UTF_8
 
  if filename
    # If filename is present, encoding defaults to UTF-8 unless modified elsewhere
  elsif content_type
    list = content_type.split(';Utils')
    # Iterates through all parameters in the Content-Type header
    content_type.split(/;\s*/).each do |param|
      k, v = param.split('=', 2)
      if k == 'charset'
        encoding = find_encoding(v)
      end
    end
  end
 
  body.force_encoding(encoding)
end
 
def find_encoding(enc)
  Encoding.find enc
rescue ArgumentError
  Encoding::BINARY
end

The remediation, committed in 7c16c669fe2040ac395cf05a242f80527ddab16b (for the 3.1 branch) and 8ae2ea868a13eec2cfa7065a1ea8b527c567fad9 (for the 3.2 branch), modifies lib/rack/multipart/parser.rb to pre-validate all requested encoding names against an in-memory set before calling Encoding.find:

@@ -1,5 +1,6 @@
 # frozen_string_literal: true
 
+require 'set'
 require 'strscan'
 
 require_relative '../utils'
@@ -643,13 +644,27 @@ def tag_multipart_encoding(filename, content_type, name, body)
         body.force_encoding(encoding)
       end
 
+      # Populate a frozen Set of all valid, currently registered encoding names
+      # converted to lowercase at class load time for O(1) memory lookups.
+      ENCODING_NAMES = Set.new(Encoding.name_list.map(&:downcase)).freeze
+      private_constant :ENCODING_NAMES
+
       # Return the related Encoding object. However, because
       # enc is submitted by the user, it may be invalid, so
       # use a binary encoding in that case.
       def find_encoding(enc)
-        Encoding.find enc
-      rescue ArgumentError
-        Encoding::BINARY
+        if respect_requested_encoding?(enc)
+          begin
+            Encoding.find(enc)
+          rescue ArgumentError
+            nil
+          end
+        end || Encoding::BINARY
+      end
+
+      # Whether to respect the given encoding (given as a string). If a
+      # requested encoding is not respected, binary encoding is used.
+      # The string may be nil or in any encoding, so compare it as bytes.
+      def respect_requested_encoding?(encoding_string)
+        ENCODING_NAMES.include?(encoding_string.to_s.b.downcase(:ascii))
       end
 
       REENCODE_DUMMY_ENCODINGS = {

The patch addresses the vulnerability through three specific mechanisms:

  1. Constant-Time Pre-Validation (ENCODING_NAMES): When Rack::Multipart::Parser loads, it queries Encoding.name_list, normalizes every entry to lowercase, and stores them in a frozen Set constant named ENCODING_NAMES. Because all standard character encodings in Ruby are registered at startup, this set contains all valid encodings without requiring dynamic .so resolution.
  2. Byte-Safe Normalization (respect_requested_encoding?): Before passing user input to Encoding.find, respect_requested_encoding? converts the input string to a raw byte representation (.to_s.b), performs an ASCII-only lowercase operation (.downcase(:ascii)), and checks for set membership in ENCODING_NAMES. Using .b.downcase(:ascii) guarantees that malformed multibyte sequences in the untrusted parameter string cannot raise an Encoding::CompatibilityError or ArgumentError during normalization.
  3. Handling Nil Return Values (|| Encoding::BINARY): Because Encoding.name_list includes the special string "internal", respect_requested_encoding?("internal") returns true. However, when Encoding.find("internal") returns nil (when Encoding.default_internal is unset), the boolean short-circuit || Encoding::BINARY catches the nil result and substitutes Encoding::BINARY, preventing the TypeError crash during body.force_encoding(encoding).

> [!NOTE] > Fix Completeness Assessment: The patch completely eliminates the $LOAD_PATH filesystem traversal attack vector across all multipart encoding resolution entry points (both Content-Type charset parameters and RFC 5987 filename* charset headers, as both flow through find_encoding). Even if an attacker sends 10,000 charset parameters in a single part header, each lookup is now resolved via an in-memory hash set check (Set#include?), completing in microseconds rather than tens of seconds.

Exploitation

Exploiting CVE-2026-142592 requires no authentication, special privileges, or prior knowledge of the target application's specific business logic. The sole prerequisite is an HTTP endpoint hosted by a Rack-based web server (such as a Ruby on Rails application running on Puma, Unicorn, or Passenger) that accepts requests and invokes Rack's multipart request parser (for example, via Rack::Request#POST or Rack::Request#params). In frameworks like Ruby on Rails, action controller middleware automatically parses multipart payloads on incoming POST, PUT, and PATCH requests before routing to controller actions.

To trigger the resource amplification loop, an attacker constructs an HTTP POST request with the header Content-Type: multipart/form-data; boundary=----BoundaryDoS. Inside the multipart body, the attacker defines a standard form field part (without a filename disposition parameter, ensuring the elsif content_type branch in tag_multipart_encoding is taken) and appends thousands of semicolon-separated charset=<invalid_name> directives to the part's Content-Type header.

POST /login HTTP/1.1
Host: vulnerable-rack-app.example.com
Content-Type: multipart/form-data; boundary=----BoundaryDoS
Content-Length: 90150
 
------BoundaryDoS
Content-Disposition: form-data; name="user"
Content-Type: text/plain; charset=u0001; charset=u0002; charset=u0003; ... [repeated 5,000 times] ... ; charset=u5000
 
value
------BoundaryDoS--

The following Python proof-of-concept demonstrates how an asymmetric payload of approximately 80 KB can be generated to test an endpoint:

import requests
 
def generate_malicious_multipart(num_charsets=5000):
    boundary = "----BoundaryDoS"
    # Generate 5,000 invalid charset parameters (~16 bytes each = ~80 KB total)
    charsets = "; ".join([f"charset=inv{i:05d}" for i in range(num_charsets)])
    
    body = (
        f"--{boundary}\r\n"
        f"Content-Disposition: form-data; name=\"field\"\r\n"
        f"Content-Type: text/plain; {charsets}\r\n\r\n"
        f"data\r\n"
        f"--{boundary}--\r\n"
    )
    headers = {
        "Content-Type": f"multipart/form-data; boundary={boundary}"
    }
    return body, headers
 
# Warning: For authorized testing of staging environments only
# body, headers = generate_malicious_multipart(5000)
# requests.post("http://localhost:3000/", data=body, headers=headers)

The computational asymmetry of this payload is substantial. Each charset=invXXXXX directive adds only 18 bytes to the HTTP request body. At 5,000 parameters, the total request size is roughly 90 KB—well below default reverse proxy and web server body size limits (for instance, NGINX's default client_max_body_size is 1 MB, and Rails environments commonly permit 10 MB to 100 MB uploads).

When the target Rack application processes this 90 KB request:

  1. If the application has 250 directories in $LOAD_PATH, each of the 5,000 invalid charsets causes Ruby MRI to execute 250 filesystem stat calls looking for enc/invXXXXX.so.
  2. A single 90 KB HTTP request forces the operating system kernel and filesystem to execute $5,000 \times 250 = 1,250,000$ stat system calls.
  3. At an average cost of 2 milliseconds per failed Encoding.find traversal, a single worker thread is pinned at 100% CPU and synchronous I/O wait for 10 seconds.
  4. If the attacker increases the parameter count to 25,000 (~450 KB payload) or transmits 10 to 20 concurrent 90 KB requests, every worker thread or process in a standard Puma or Unicorn pool is immediately occupied, rendering the entire web application unresponsive to legitimate traffic.

Impact Assessment

CVE-2026-142592 is assigned a CVSS v3.1 base score of 7.5 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The Attack Vector is Network (AV:N) and Attack Complexity is Low (AC:L), as any client capable of establishing an HTTP connection to the application can send a static multipart payload without authenticating (PR:N) or relying on user interaction (UI:N). The vulnerability does not allow reading memory or modifying application data (C:N/I:N), confining its direct impact to Availability (A:H).

In production Ruby deployments, the operational consequences of this vulnerability are severe due to the concurrency architecture of Ruby web servers. Most Ruby applications run on MRI (CRuby), where threads within a worker process contend for the Global VM Lock (GVL), or use multi-process pre-forking models (such as Unicorn or Puma in clustered mode) with a fixed number of worker threads (commonly 3 to 16 threads per process). While filesystem stat operations inside Encoding.find may briefly release and re-acquire the GVL around OS system calls, the sheer volume of path concatenations, string allocations, and kernel context switches saturates both the Ruby VM and the underlying CPU cores.

Furthermore, when worker threads remain blocked inside Rack::Multipart::Parser for 15 to 60 seconds, upstream load balancers (such as AWS Application Load Balancers, Cloudflare, or NGINX) and process monitors (such as Puma's worker timeout supervisor or Kubernetes liveness probes) detect that the application is no longer responding to health checks. Puma will forcefully terminate and respawn timed-out worker processes (SIGKILL), while Kubernetes may enter a crash-loop restart cycle for the affected pods, magnifying the outage duration even after attack traffic ceases.

As of current threat intelligence tracking, CVE-2026-142592 has an EPSS score of 0.00644 (52.32nd percentile) and is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, the trivial nature of constructing an exploit payload—requiring only standard multipart HTTP headers—means any internet-facing Ruby service running Rack 3.0.x, 3.1.x (prior to 3.1.24), or 3.2.x (prior to 3.2.9) is exposed to low-bandwidth application-layer denial-of-service attacks.

Remediation

The definitive remediation for CVE-2026-142592 is to upgrade the rack gem to a patched release (3.1.24 for the 3.1 release series, or 3.2.9 for the 3.2 release series). Note that the Rack 3.0.x branch is end-of-life and does not have a dedicated point release; users on Rack 3.0.x must upgrade to >= 3.1.24 or >= 3.2.9.

To apply the update in a Bundler-managed project, update the version constraint in your Gemfile:

# For applications tracking the 3.1 branch:
gem "rack", "~> 3.1.24"
 
# Or for applications tracking the 3.2 branch:
gem "rack", "~> 3.2.9"

Then execute Bundler to update Gemfile.lock and verify the installed version:

bundle update --conservative rack
bundle info rack

> [!NOTE] > Monkey-Patch Workaround for Legacy or Frozen Deployments: If an application cannot immediately upgrade the rack gem (for example, those locked to Rack 3.0.x due to strict dependency constraints), administrators can deploy an initializer (such as config/initializers/rack_multipart_encoding_patch.rb in Ruby on Rails) that backports the ENCODING_NAMES set validation directly onto Rack::Multipart::Parser:

# config/initializers/rack_multipart_encoding_patch.rb
require 'set'
require 'rack/multipart/parser'
 
if Rack.release.start_with?('3.') && !Rack::Multipart::Parser.const_defined?(:ENCODING_NAMES)
  class Rack::Multipart::Parser
    ENCODING_NAMES = Set.new(Encoding.name_list.map(&:downcase)).freeze
    private_constant :ENCODING_NAMES
 
    private
 
    def find_encoding(enc)
      if respect_requested_encoding?(enc)
        begin
          Encoding.find(enc)
        rescue ArgumentError
          nil
        end
      end || Encoding::BINARY
    end
 
    def respect_requested_encoding?(encoding_string)
      ENCODING_NAMES.include?(encoding_string.to_s.b.downcase(:ascii))
    end
  end
end

In addition to application-level patching, security teams can implement perimeter filtering at the Web Application Firewall (WAF) or reverse proxy layer (such as ModSecurity, AWS WAF, or NGINX) to block requests containing anomalous multipart part headers with multiple charset= attributes.

Official Patches

RackOfficial GitHub Security Advisory (GHSA-58mf-c3jj-277p)
RackRack v3.1.24 Release Notes
RackRack v3.2.9 Release Notes
RackPatch Commit for Rack 3.1.x Branch
RackPatch Commit for Rack 3.2.x Branch

Fix Analysis (2)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.64%
Top 48% most exploited

Affected Systems

Ruby Gem: rack (>= 3.0.0, < 3.1.24)Ruby Gem: rack (>= 3.2.0, < 3.2.9)Ruby on Rails, Sinatra, Hanami, and other Ruby web frameworks utilizing vulnerable Rack 3.x releases

Affected Versions Detail

Product
Affected Versions
Fixed Version
rack
rack
>= 3.0.0, < 3.1.243.1.24
rack
rack
>= 3.2.0, < 3.2.93.2.9
AttributeDetail
CVE IDCVE-2026-142592 (GHSA-58mf-c3jj-277p)
Weakness ClassCWE-400: Uncontrolled Resource Consumption
CVSS v3.1 Score7.5 HIGH (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
EPSS Score0.64% (52.32nd Percentile)
Attack VectorUnauthenticated Network HTTP Multipart POST Request
Affected ComponentRack::Multipart::Parser#find_encoding (lib/rack/multipart/parser.rb)
Patched VersionsRack 3.1.24 and Rack 3.2.9 (Rack 2.2.x is not affected)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1499.003Endpoint Denial of Service: Application Exhaustion Flood
Impact
CWE-400
Uncontrolled Resource Consumption

The product does not properly control the allocation, maintenance, or release of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Vulnerability Timeline

GitHub Security Advisory GHSA-58mf-c3jj-277p and CVE-2026-142592 published; Rack 3.1.24 and 3.2.9 released
2026-12-02
CVE-2026-142592 published to the National Vulnerability Database (NVD)
2026-12-02
NVD and CVE record metadata updated with CVSS v3.1 scoring and CWE-400 classification
2026-12-03

References & Sources

  • [1]GitHub Security Advisory GHSA-58mf-c3jj-277p: Rack Multipart parser searches the load path for every unknown part charset
  • [2]Rack Patch Commit 7c16c669fe2040ac395cf05a242f80527ddab16b (v3.1 branch)
  • [3]Rack Patch Commit 8ae2ea868a13eec2cfa7065a1ea8b527c567fad9 (v3.2 branch)
  • [4]Rack v3.1.24 Release
  • [5]Rack v3.2.9 Release
  • [6]NVD - CVE-2026-142592 Detail
  • [7]CVE.org Record: CVE-2026-142592
  • [8]CVEProject cvelistV5 Record for CVE-2026-142592

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-142596
7.5

CVE-2026-142596: Projection Sanitization Bypass and Schema-Level Exclusion Disclosure in Mongoose

A projection sanitization and schema path exclusion bypass vulnerability exists in Mongoose versions 8.5.0 through 8.24.9 and 9.0.0 through 9.12.1. Due to insufficient validation of MongoDB projection syntax in `sanitizeProjection` and `applyPaths`, attackers supplying untrusted projection inputs to queries can force the retrieval of sensitive schema fields configured with `select: false`, such as password hashes, reset tokens, and multi-factor authentication secrets.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 3 hours ago•CVE-2026-142595
6.5

CVE-2026-142595: NoSQL Query Operator Injection via Incomplete Denylist in Automattic Mongoose sanitizeFilter

CVE-2026-142595 is a NoSQL query operator injection vulnerability in Automattic Mongoose caused by an incomplete denylist in the sanitizeFilter query sanitization utility. Prior to the patched versions, sanitizeFilter blocked only four specific top-level operators ($jsonSchema, $where, $expr, and $text), allowing unrecognized or internal MongoDB operators such as $_internalSchemaXor and $_internalSchemaCond to pass through unsanitized. Attackers capable of supplying top-level filter keys can inject arbitrary nested query selectors to bypass authentication, extract sensitive data via boolean inference, or modify database records.

Amit Schendel
Amit Schendel
5 views•12 min read
•about 4 hours ago•CVE-2026-142610
7.5

CVE-2026-142610: Resource Exhaustion Denial of Service via Arbitrary-Precision Math in Laravel Framework

CVE-2026-142610 (GHSA-c25c-x5r7-2v5m) is an allocation of resources without limits or throttling vulnerability (CWE-770) in the Laravel Framework (`laravel/framework`). The flaw exists in how Laravel passes user-supplied numeric strings to the `brick/math` arbitrary-precision arithmetic library during specific validation rules (`multiple_of`, `gt`, `gte`, `lt`, `lte`) and Eloquent model decimal casting (`decimal:X`). When an unauthenticated remote attacker supplies a numeric string formatted in scientific notation with a large positive or negative exponent (e.g., `1e-100000000`), `Brick\Math\BigDecimal` and `Brick\Math\BigNumber` attempt to expand the full numeric representation in memory. This operation immediately exhausts the PHP process memory limit and causes high CPU utilization, terminating worker threads and resulting in an application-layer Denial of Service (DoS). The vulnerability is remediated in Laravel versions 12.74.0 and 13.44.1.

Alon Barad
Alon Barad
7 views•11 min read
•about 5 hours ago•CVE-2026-137198
8.3

CVE-2026-137198: Argument Injection in Node.js cross-spawn via Improper Backslash Escaping on Windows

CVE-2026-137198 is a high-severity argument injection vulnerability (CWE-88) affecting the Node.js cross-spawn library in versions 6.0.6 and 7.0.4 through 7.0.6. On Windows systems, when commands are routed through cmd.exe (including batch files and npm cmd-shims in node_modules/.bin), cross-spawn fails to properly double contiguous sequences of two or more backslashes preceding a double quote or at the end of an argument. This parsing failure causes the argument's closing quotation mark to be escaped as a literal character, allowing attacker-controlled input to break out of quotation encapsulation and inject arbitrary command-line arguments or consume subsequent arguments.

Amit Schendel
Amit Schendel
11 views•13 min read
•about 6 hours ago•CVE-2026-144292
7.6

CVE-2026-144292: Client-Side Template Injection and Cross-Site Scripting in DOMPurify via SAFE_FOR_TEMPLATES Bypass

DOMPurify prior to version 3.5.0 contains a sanitization bypass in the SAFE_FOR_TEMPLATES configuration mode. By embedding split template expression delimiters across invalid nested <form> elements, an attacker can evade character data scrubbing during initial sanitization. When the sanitized markup is subsequently re-parsed into the DOM via innerHTML, browser HTML5 parsing rules strip the nested <form> tags and concatenate the split text nodes, reconstructing executable template expressions that trigger Cross-Site Scripting (XSS) in client-side template engines.

Amit Schendel
Amit Schendel
9 views•11 min read
•about 7 hours ago•CVE-2026-74870
3.3

CVE-2026-74870: Cleartext Exposure of Hardware-Derived Cryptographic Peppers in openssl_encrypt

CVE-2026-74870 is an information exposure vulnerability in the Python package openssl_encrypt affecting versions 1.4.7 and earlier. The diagnostic CLI subcommands 'hsm fido2-test' and 'hsm onlykey-test' unconditionally write full derived hardware cryptographic peppers as hexadecimal strings to standard error. Additionally, the FIDO2 hardware pepper plugin logs unredacted pseudo-random function (PRF) output to debug logs and user-facing error messages. While the diagnostic pepper is bound to a random per-invocation test salt and cannot directly decrypt stored files, the behavior exposes raw hardware-derived key material to terminal scrollbacks, session recordings, and CI/CD logs.

Alon Barad
Alon Barad
6 views•10 min read