You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method initDocumentParser() in the XMLSchedulingDataProcessor.java does not forbid DTDs, which allows a context-dependend attacker to perfom an XXE. The vulnerability is confirmed working in version 2.2.3.
I reported this issue to the MITRE cooperation already which assigned the identifier CVE-2019-13990 to this vulnerability. Please confirm the existence of this vulnerability so that the CVE-entry can be completed and published.
The OWASP Foundation provides an XXE Prevention CheatSheet that explains in detail the steps to prevent this security issue.
Credits to Andreas Schoedl for working out the relevant code section affected by this issue.
@krabbenpuler I've been taking a look at this, and I think I have a patch I can send as a PR for master. Do you have a specific test case I can verify it with?
@jgallimore How can we avoid this issue in current 2.3.0 version without your patch? Any workaround or setting in the qutarz configuration file can avoid this issue?
@julyhurt I think it depends on how you're using and driving Quartz. For context, I'm coming from Apache TomEE, where we have an old version of TomEE that uses Quartz for EJB timers, so we're using it as a library, rather than standalone. Its possible that our use of Quartz isn't actually vulnerable, but this issue flagged up on a scan, so I'm more than happy to help fix it.
In terms of mitigating this without a patch - if you're passing XML to Quartz, and that XML is untrusted, I would do something to check it before handing it over to Quartz - so that might mean parsing it with a well configured parser first, and then passing it to Quartz.
There's no 2.3.x branch, but I'm happy to patch 2.3.0 and create a branch for that. I'm not a committer on Quartz though, so I can't actually get anything into the repository, or get a release made. I have tried posting to the user and dev forums, both of which seem to have disappeared (for me at least) and I've tried emailing SoftwareAG to see if they need a signed CLA, per the guidelines here: https://github.com/quartz-scheduler/quartz/blob/master/docs/contribute.adoc. I've heard nothing back, so I'm starting to be a little concerned that potentially no-one is working on the project any more.
You're very welcome, and I appreciate the reviews, feedback and comments from everyone here.
I also would like to see a Terracotta version published, but I haven't seen any activity on this project from its committers for something like 7 months, so I'm not sure what will happen.
@vineetpandey I have been trying to contact @zemian and @chrisdennis they are both active TerraCotta commiters for Quartz and Ehcache and it has not gotten any response.
When you lose interest in a program, your last duty to it is to hand it off to a competent successor.
-The Cathedral and the Bazaar
@melloware I'm working on trying to get a future plan for Quartz figured out, but this is something that will have to happen on its own timeframe - it's likely going to involve a lot of moving parts, many of which I have little to no influence over. Once I have the beginning of a plan figured out I'll likely file an issue for it here. In the meantime I'll look in to whether I can independently get this specific issue released on a shorter timeframe.
Activity
jgallimore commentedon Aug 5, 2019
@krabbenpuler I've been taking a look at this, and I think I have a patch I can send as a PR for master. Do you have a specific test case I can verify it with?
krabbenpuler commentedon Aug 5, 2019
@jgallimore Sure, the following attack vector worked in my case:
jgallimore commentedon Aug 6, 2019
That's great - thanks for that.
Issue quartz-scheduler#467 provide XML parser with a strong configura…
jgallimore commentedon Aug 6, 2019
PR for master: #472
jgallimore commentedon Aug 6, 2019
I'll send an email, but I'm happy to file a CLA if needed.
Issue quartz-scheduler#467 provide XML parser with a strong configura…
jgallimore commentedon Aug 6, 2019
Same patch for the quartz-2.2.x branch. #473
ddillard commentedon Aug 7, 2019
@krabbenpuler You said you got the CVE, why are the versions in the CVE up to and including 2.3.0 instead of 2.3.1?
krabbenpuler commentedon Aug 7, 2019
@ddillard Good point, I'm actually not sure why only the 2.3.0 made it into the CVE. I'll inform MITRE about that as soon as possible.
julyhurt commentedon Aug 12, 2019
@jgallimore How can we avoid this issue in current 2.3.0 version without your patch? Any workaround or setting in the qutarz configuration file can avoid this issue?
jgallimore commentedon Aug 14, 2019
@julyhurt I think it depends on how you're using and driving Quartz. For context, I'm coming from Apache TomEE, where we have an old version of TomEE that uses Quartz for EJB timers, so we're using it as a library, rather than standalone. Its possible that our use of Quartz isn't actually vulnerable, but this issue flagged up on a scan, so I'm more than happy to help fix it.
In terms of mitigating this without a patch - if you're passing XML to Quartz, and that XML is untrusted, I would do something to check it before handing it over to Quartz - so that might mean parsing it with a well configured parser first, and then passing it to Quartz.
There's no 2.3.x branch, but I'm happy to patch 2.3.0 and create a branch for that. I'm not a committer on Quartz though, so I can't actually get anything into the repository, or get a release made. I have tried posting to the user and dev forums, both of which seem to have disappeared (for me at least) and I've tried emailing SoftwareAG to see if they need a signed CLA, per the guidelines here: https://github.com/quartz-scheduler/quartz/blob/master/docs/contribute.adoc. I've heard nothing back, so I'm starting to be a little concerned that potentially no-one is working on the project any more.
onlysyz commentedon Aug 15, 2019
what a sad story~~~
Issue quartz-scheduler#467 provide XML parser with a strong configura…
Issue quartz-scheduler#467 provide XML parser with a strong configura…
18 remaining items
vineetpandey commentedon Sep 27, 2019
@jgallimore Thanks for the resolution. Much appreciated.
Any chance if this quartz fix can get Terracotta published ?
jgallimore commentedon Sep 27, 2019
You're very welcome, and I appreciate the reviews, feedback and comments from everyone here.
I also would like to see a Terracotta version published, but I haven't seen any activity on this project from its committers for something like 7 months, so I'm not sure what will happen.
I did publish my binaries (under a org.tomitribe.quartz groupId) on Maven central in case anyone wishes to use them: https://mvnrepository.com/search?q=org.tomitribe.quartz. Corresponding source code is here: https://github.com/tomitribe/quartz/tree/quartz-2.2.4 and here: https://github.com/tomitribe/quartz/tree/quartz-2.3.2.
vineetpandey commentedon Sep 27, 2019
@zemian - you are one of the significant contributor of quartz.
Can you get this Terracotta published or redirect to correct person?
melloware commentedon Sep 27, 2019
@vineetpandey I have been trying to contact @zemian and @chrisdennis they are both active TerraCotta commiters for Quartz and Ehcache and it has not gotten any response.
chrisdennis commentedon Sep 27, 2019
@melloware I'm working on trying to get a future plan for Quartz figured out, but this is something that will have to happen on its own timeframe - it's likely going to involve a lot of moving parts, many of which I have little to no influence over. Once I have the beginning of a plan figured out I'll likely file an issue for it here. In the meantime I'll look in to whether I can independently get this specific issue released on a shorter timeframe.
melloware commentedon Sep 27, 2019
Much appreciated @chrisdennis
Fixes quartz-scheduler#467 provide XML parser with a strong configura…
Fixes quartz-scheduler#467 provide XML parser with a strong configura…
mtarnawa commentedon Oct 11, 2019
@chrisdennis - any chance of this fix getting an incremental release in Maven?
melloware commentedon Oct 11, 2019
@mtarnawa He is working on it. They are planning on getting a 2.3.2 in Maven with these security fixes.
chrisdennis commentedon Oct 11, 2019
Just want to get #475 merged in and then I'll move forward with releasing. Looking like that will happen next week now.
vineetpandey commentedon Oct 11, 2019
Thanks @chrisdennis, @melloware, @jgallimore!
Much appreciated your efforts.
Looking forward to the official release.
flowergoo commentedon Oct 24, 2019
@chrisdennis thanks for the contribution, this security vulnerability has been there for a while. May I know when you plan for the release? :)
melloware commentedon Oct 24, 2019
@flowergoo It was released yesterday as 2.3.2 and is available on Maven Central.
https://github.com/quartz-scheduler/quartz/releases/tag/v2.3.2