Repository navigation
fix(deps): bump jsoup to 1.23.2 for CVE-2026-75140 (2.8.x) - #1355
Merged
Merged
Conversation
jsoup is shaded into the jinjava jar, so consumers cannot override the vulnerable 1.15.3 version themselves. jsoup's pretty-printer changed between 1.15.3 and 1.23.2, so update the closehtml expectation for a block element nested inside another block. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 826abcd)
rewaddell
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This description was authored by Claude Code.
Part of #1342. Backport to
master-2.8.xof #1354 (cherry-picked as-is).Bumps the shaded jsoup dependency from 1.15.3 to 1.23.2, which fixes CVE-2026-75140 (affected range is <= 1.23.1). Because jsoup is shaded into the jinjava jar under
jinjava.org.jsoup, consumers can't override the version themselves and have to wait for a jinjava release.Jinjava only uses jsoup's HTML parser (
Jsoup.parse/parseBodyFragment/cleanintruncatehtml,striptagsandclosehtml). It never usesXmlTreeBuilder, so jinjava isn't directly exploitable. The point of this bump is to clear the vulnerable artifact flagged by downstream scanners.Supersedes the community PRs #1353 (master) and #1337 (2.7.x). #1337 turned off pretty-printing in
CloseHtmlFilter. I measured that option: it changesclosehtmloutput for more inputs (11 of 20 sampled) than keeping the default (4 of 20). Turning it off intruncatehtmlalso breaks that filter's existing tests. So both filters keep jsoup's default pretty-printing here.BRAVE
Backwards Compatibility
truncatehtmlandclosehtml: newlines and indentation around block elements move. For example,<h1><p>x</p></h1>now prints the nested<p>on its own indented line, while<div><div>deep</div></div>collapses the innermost<div>deep</div>onto one line. Content between tags is unchanged, except that inline text next to a block element or<br>may gain or lose a newline.striptags: text from adjacent block-level elements is now space-separated. For example,<select><option>1<option>2</select>gives1 2instead of12.closehtmlisn't registered in the default filter library, so only consumers who register it themselves are affected.CloseHtmlFilterTest.itClosesMultipleTagswas updated for the new nested-block whitespace. All other existing tests pass unchanged.Rollout and Rollback Plan
Automated Testing
TruncateHtmlFilterTest,StripTagsFilterTestandCloseHtmlFilterTestcover the jsoup-backed filters.mvn verifypasses locally.Verification
closehtml,truncatehtml(with and withoutkillwords) andstriptagsagainst both jsoup versions, and diffed the output. The only differences are the whitespace changes listed above.META-INF/maven/org.jsoup/jsoup/pom.propertiesreportsversion=1.23.2.Expect Dependencies to Fail
truncatehtml/closehtml/striptagsoutput may need its whitespace expectations updated.REVIEWERS: Please review both the code changes and the answers above, and validate that they match the expectations for BRAVE
🤖 Generated with Claude Code