Skip to content

Harden XSLT step against XXE attacks - #453

Merged
mgaffigan merged 2 commits into
OpenIntegrationEngine:mainfrom
mgaffigan:maint/fix-cve-78224
Sep 22, 2026
Merged

mgaffigan merged 2 commits into
OpenIntegrationEngine:mainfrom
mgaffigan:maint/fix-cve-78224

Conversation

@mgaffigan

Copy link
Copy Markdown
Contributor

Parses the untrusted XML securely to prevent XXE attacks. Retains trust of the XML Stylesheet since that is not attacker controlled.

Review notes:

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown

Test Results

124 files  + 1  124 suites  +1   2m 52s ⏱️ + 1m 3s
698 tests + 8  698 ✅ + 8  0 💤 ±0  0 ❌ ±0 
722 runs  +20  722 ✅ +20  0 💤 ±0  0 ❌ ±0 

Results for commit 883de45. ± Comparison against base commit 9359d9a.

♻️ This comment has been updated with latest results.

jonbartels
jonbartels previously approved these changes Sep 21, 2026

@gibson9583 gibson9583 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes before merge.

The new parsing path breaks valid XSLT transformations when a channel uses Xerces. The batch endpoint added in this PR also has two issues: it can report success without accepting a batch, and it retains all processed message payloads.

Please address the three inline comments. The two batch API issues also apply to PR #452 because both PRs include the same API change.

Comment thread server/src/main/java/com/mirth/connect/server/api/servlets/MessageServlet.java Outdated
Comment thread server/src/main/java/com/mirth/connect/util/MirthXmlUtil.java Outdated
gibson9583
gibson9583 previously approved these changes Sep 21, 2026

@gibson9583 gibson9583 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to merge, items raised are non-blocking

Originally authored by JonB.  Separated tests from fix.  See feeec8d.

Signed-off-by: Jon Bartels <jonathan.bartels@gmail.com>
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
@mgaffigan
mgaffigan dismissed stale reviews from gibson9583 and jonbartels via d1a05e2 September 21, 2026 19:54

@tonygermano tonygermano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had requested in #452 that the commit messages be expanded. That applies here, too, especially since this PR has the same or similar commit that prompted the request in the other PR.

@mgaffigan

Copy link
Copy Markdown
Contributor Author

@tonygermano

I had requested in #452 that the commit messages be expanded. That applies here, too, especially since this PR has the same or similar commit that prompted the request in the other PR.

You're welcome to rewrite the commit messages - I said everything I would think to say in them (short of asking a clanker to bloviate). If someone wants to know "what" changed, they have the git diff. I'm focusing on the "why".

@gibson9583
gibson9583 self-requested a review September 21, 2026 20:25
gibson9583
gibson9583 previously approved these changes Sep 21, 2026
Comment thread server/src/main/java/com/mirth/connect/util/MirthXmlUtil.java Outdated
@tonygermano

Copy link
Copy Markdown
Member

@tonygermano

I had requested in #452 that the commit messages be expanded. That applies here, too, especially since this PR has the same or similar commit that prompted the request in the other PR.

You're welcome to rewrite the commit messages - I said everything I would think to say in them (short of asking a clanker to bloviate). If someone wants to know "what" changed, they have the git diff. I'm focusing on the "why".

@mgaffigan No longer necessary on this PR. You removed the large duplicate commit that also appears in the other PR. The remaining changes are small enough to not need additional explanation.

Parses the untrusted XML securely to prevent XXE attacks.  Retains trust
of the XML Stylesheet since that is not attacker controlled.

Breaking change: XML messages cannot contain DOCTYPE declarations.

Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
@mgaffigan
mgaffigan merged commit 1e87457 into OpenIntegrationEngine:main Sep 22, 2026
11 checks passed
@mgaffigan
mgaffigan deleted the maint/fix-cve-78224 branch September 22, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants