Skip to content
OpenAdvisories
High openSUSE-SU-2026:21900-1 1 CVE

Security update for jsoup, re2j

Published Sep 21, 2026 · Updated Sep 25, 2026

Summary

This update for jsoup, re2j fixes the following issue:

- CVE-2026-75140: The builder copies the entire inherited namespace map on every start element, causing quadratic time
and memory complexity, which attackers can exploit to trigger an OutOfMemoryError and terminate the application
(bsc#1275912).

Changes for jsoup:

- Upgrade to upstream version 1.23.2
+ Improvement: Improved consecutive StreamParser.selectFirst()
calls during progressive parsing, so later matches are
returned with their parsed contents when earlier selections
had left them as parser lookahead. E.g., given
<title>One</title><p id=hit>Full</p><p>Next</p>, selecting
title and then #hit now advances the partial lookahead and
returns <p id="hit">Full</p>, rather than returning an empty
<p id="hit"></p> before its content is parsed. The updated
readiness tracking follows StreamParser's normal emission
order across implicit HTML structure and parser recovery.
+ Improvement: Improved XML parser performance and memory use
for documents with many nested namespace declarations by
recording namespace changes within each element scope
(bsc#1275912, CVE-2026-75140).
+ Improvement: Improved W3CDom conversion performance for
documents with many nested namespace declarations. The W3C
converter now uses the same optimized namespace tracking as
the XML parser.
+ Improvement: Improved W3CDom XML conversion to retain
processing instructions, comments outside the root element,
and CDATA sections, which were previously dropped or converted
to text.
+ Improvement: DOM mutation methods, including child insertion
and replacement, now reject operations that would create a
cycle, such as making a node its own child or moving an
ancestor beneath a descendant.
+ Improvement: Added Elements#before(Node), after(Node),
prepend(Node), and append(Node) to match the existing HTML
string methods.
+ Improvement: Large file-backed uploads through
Connection.requestBodyStream(InputStream) now stream directly
with the JDK HttpClient on Java 11+, rather than being loaded
fully into memory first.
+ Improvement: Extended Java 11+ HTTP client reuse from requests
sharing a Jsoup.newSession() to ordinary Jsoup.connect()
calls, reducing transport thread and connection setup churn
under sustained request loads. Sessions with custom
authentication or SSL contexts continue to use their own
client.
+ Change: Aligned the XML parser stack depth and lookups to the
configured maximum, which now defaults to 512 for both HTML
and XML. Use Parser#setMaxDepth(int) to configure.
+ Bugfix: Fixed W3CDom namespace conversion in several cases:
- Namespace declarations and prefixed attributes now carry the
correct namespace URI, so namespace-aware DOM lookups work
as expected.
- Attributes added after parsing, or included through subtree
conversion, now use inherited prefix declarations.
- Namespace declarations now apply regardless of attribute
order, and an empty declaration shadows an inherited binding
only within its scope.
- With namespace awareness disabled, inherited and undeclared
prefixes now receive the declarations needed for XML
serialization.
- Valid HTML names that are not XML QNames, such as a:b:c, are
normalized. Attributes that still cannot be represented are
skipped, and unrepresentable elements no longer change the
surrounding tree.
+ Bugfix: Fixed W3CDom conversion of programmatically created or
renamed elements whose names can be represented in a jsoup
HTML DOM but are not valid XML names, such as 1abc. These
names are now normalized (e.g. _1abc) instead of causing a
NullPointerException.
+ Bugfix: Fixed XML doctype serialization when a system
identifier contains a double quote, which could otherwise
produce invalid XML.
+ Bugfix: XML serialization now repairs element and attribute
names that start with an invalid character, rather than
outputting null elements or dropping attributes. For example,
an attribute named 1a is written as _1a. Additional leading
underscores keep repaired attribute names unique if they
conflict with another attribute.
+ Bugfix: Supplementary Unicode characters are now escaped
correctly when serializing with non-UTF, non-ASCII output
charsets such as ISO-8859-1. Previously, characters could be
emitted unescaped when their low 16-bit value was
representable by the configured charset, causing replacement
or corruption when the output was encoded.
+ Bugfix: Fixed the JDK HttpClient implementation to accept
responses missing a Content-Type header, matching the
HttpURLConnection implementation.
+ Bugfix: Fixed HTTP response content-type matching to handle
media types case-insensitively and recognize structured +xml
suffixes, including vendor-specific media types.
+ Bugfix: HTTP request URL normalization now percent-encodes
ASCII control characters, DEL, and embedded fragment
delimiters, keeping normalized URLs valid for HTTP requests
while preserving existing escapes.
+ Bugfix: Corrected multipart form encoding to percent-escape CR
and LF in field names and filenames, matching the HTML form
submission specification. Multipart file content-types
containing CR or LF are now rejected with a
ValidationException.
+ Bugfix: Aligned trailing comment placement with the HTML
specification: comments after </body> remain children of the
html element, while comments after </html> remain children of
the document.
+ Bugfix: When using the optional re2j regular expression
engine, memory allocation errors caused by complex selector
patterns at match time are now normalized to a
ValidationException with a Pattern complexity error message.
+ Bugfix: Fixed parsing of malformed SVG and MathML content so
that breakout HTML tags are placed according to the HTML
specification.
+ Bugfix: Fixed deeply nested malformed HTML parsing that could
lose the document body because stack lookups did not align to
the configured maximum parser depth.
+ Bugfix: Alig

Fixed packages 2

ReleasePackageFixed in
openSUSE · Leap 16.0 jsoup 1.23.2-160000.1.1
openSUSE · Leap 16.0 re2j 1.8-160000.1.1

Vulnerabilities 1

  • High 7.5

    jsoup Uncontrolled Resource Consumption in XmlTreeBuilder

    jsoup through 1.23.2, fixed in commit 862ba2f, contains an uncontrolled resource consumption vulnerability in XmlTreeBuilder that allows remote attackers to exhaust JVM heap memory by supplying a deeply nested XML document with uniquely-namespaced elements. T…

References

  • report
    https://bugzilla.suse.com/1275912
  • web
    https://www.suse.com/security/cve/CVE-2026-75140