[
https://wcm-io.atlassian.net/browse/WHAN-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21426#comment-21426 ]
Stefan Seifert edited comment on WHAN-50 at 12/17/21 1:20 PM:
after doing deeper checks i'm quite convinced that an *attack via Rich Text Handler was never possible* even if an attacker had access to an author instance or repository: all rich text XHTML fragments that are parsed are always wrapped in a <root>...</root> element. if someone entered a DOCTYPE into the fragment, parsing always fails (added a unit test for that) - the DOCTYPE never gets evaluated.
*it is still possible that custom project code is using the JDOM library exported by us is vulnerable to XXE attacks. deploying the updated version with 2.0.6.1 will likely not fix that attack vector - you still have to do a review of your code.* but for the code that comes with the
wcm.io libraries we should be fine.
was (Author: sseifert):
i've implemented a PR
https://github.com/wcm-io/wcm-io-handler/pull/29 with precautionary improvements including the update to 2.0.6.1.
after doing deeper checks i'm quite convinced that an attack was never possible even if an attacker had access to an author instance or repository: all rich text XHTML fragments that are parsed are always wrapped in a <root>...</root> element. if someone entered a DOCTYPE into the fragment, parsing always fails (added a unit test for that) - the DOCTYPE never gets evaluated.
nevertheless i've configured the SAXBuilder which is used to do the parsing more conservatively applying the recommendations from this cheat sheet where appropriate:
https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#saxbuilder
*it is still possible that custom project code is using the JDOM library exported by us is vulnerable to XXE attacks. deploying the updated version with 2.0.6.1 is likely to not fix that attack vector - you still have to do a review of your code.* but for the code that comes with the
wcm.io libraries we should be fine.