-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API misuse of org.quartz.jobs.ee.jms.SendQueueMessageJob.execute
would lead the code injection vulnerability.
#943
Comments
This issue seems to got assigned CVE-2023-39017 |
hi falks. is there an ETA for this? also, are you going to fix this on top of 2.3.2 or part of 2.4.0? |
This vulnerability is also recorded by Black Duck. It is numbered as BDSA-2023-1984 and its level is high. The score is 8.9. When will this vulnerability be fixed? |
I wonder if this was responsibly disclosed by some other means with more complete demonstration of the issue claimed? This seems incomplete and a bit speculative. At first glance, this seems a bit dubious to me, in both severity and validity - but happy to be educated. Does an "attacker" not need access to execute arbitrary code as a pre-requisite anyway, to populate the value of Is it reasonable to think that the In canonical usage, I believe
The quartz/quartz/src/main/java/org/quartz/JobBuilder.java Lines 306 to 315 in a5c4d27
If folks are allowing untrusted user input into the construction of their |
👍
Not necessarily I think. If you
then the attacker won't need to alter existing binary code but would need access to the system to change configuration. This then leads to the same question you asked: why would they stop here? |
Fair point @marcelstoer - if an attacker has arbitrary access to alter code OR server side configuration you're in a dangerous place anyway, already breached by some other means. |
Is it correct to say that this is only relevant if you are using the quartz-jobs artifact, and anyone just using quartz shouldn't be affected? |
@maxqch we also noticed that the CPE matches any Quartz artifact and not just the affected one. |
@marcelstoer, in case someone has a dependency to just |
@astonbitecode See the discussion at jeremylong/DependencyCheck#5862 |
Thanks @marcelstoer. However, I was interested in the vulnerability itself, not the DependencyCheck-related discussion. @maxqch asked a question whether someone is still affected, even if they just use quartz and not quartz-jobs artifact. There is no explicit reply to this, instead the thumbs up reactions bellow the comment. I just wanted to be sure. |
Sorry. I can't give you an authoritative answer to this as I didn't analyze it but it looks like the answer is no. It would actually be something the folks who raised the issue in the first place should answer. Them being quiet further contributes to the dubious nature of this whole thing. |
I'm fairly certain you're not affected if you're not pulling in the actual
artifact that contains this class. I just suppressed this cve.
…On Tue, Aug 8, 2023, 1:13 AM Marcel Stör ***@***.***> wrote:
Sorry. I can't give you an authoritative answer to this as I didn't
analyze it but *it looks like* the answer is no.
It would actually be something the folks who raised the issue in the first
place should answer. Them being quiet only contributes to the dubious
nature of this whole thing.
—
Reply to this email directly, view it on GitHub
<#943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLDHTJNMBSIUZ5MX66UBG3XUHYJLANCNFSM6AAAAAA2QIZKQM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'd assume the CVE is detected if you're simply using |
Correct, everything is Having said all this, even if you are using quartz-jobs, the CVSSv3.1 base score of 9.8 seems a bit indefensible to me, and not demonstrated by the so-called "exploit". For all of these impact metrics, NVD seem to have just taken things at face value that remote code execution is possible. It seems to be of very low value to trawl the internet for libraries that have Java Anyway, it seems possible that the goal here is likely to be to gain "street cred" or buff up a resume by reporting many CVEs across projects any time it is possible to write code that allows configuration of a JNDI or LDAP URL via Unfortunately anyone can abuse the CVE process by reporting CVEs; since there is seemingly little validation going on for CVE entries and everything appears to be taken largely at face value from reporters by MITRE. NVD can't possibly have expertise in the millions of libraries out there when they assess severity. Disputing a CVE seems basically impossible unless you are a big project, or at least heavily stacked against software maintainers - "guilty until proven innocent, or maybe never" (I've tried via both MITRE and NVD before). The entire benefit of the doubt is mysteriously given to largely anonymous reporters - not to maintainers or users. I suspect you have to be a mega-company with brand at stake to have the resources/energy to get disputed CVEs removed or re-assessed. Even if this library did restrict |
Let's avoid ad-hominem or group hate attacks. I changed my opinion 180° only after taking a bit closer look. I misread the I welcome the maintainers to dispute the particular CVE at a MITRE CVE form because MITRE appears the numbering authority for the finding. Yes, guilty until proven is the unfortunate result of security concerns working their way through reverse engineering. The highlighted JMS job example as well as other job examples (JMX invoker, mail sender, EJB) may look vulnerable due to a chance of abusing the host name parameters to abuse deserialization (using own code base) and/or denial of service (e.g. sending mail). The wiring of untrusted inputs into the jobs would have to be done by the application's own code, and therefore the job examples cannot be blamed. |
I believe your initial reading of this thread missed some important points; give it another read. |
I have no idea where the maintainers are in all of this. However, I disputed this CVE with MITRE and they now at least added a "DISPUTED" note. |
Will your maintenance team fix this vulnerability in a future release? Or just ignore it? |
We've chosen to sit on the PR (teku) we've put up to see how this washes up, mostly because I'm (as a rule) not hugely a fan of moving to an RC, which is what the CVE suggests. |
@rolfyone I understand that it is not a real issue, but unfortunately, it is not always easy to explain to management/client why the application is flagged for a critical vulnerability. Having a clean security report is important in itself. |
org.quartz.jobs.ee.jms.SendQueueMessageJob.execute
org.quartz.jobs.ee.jms.SendQueueMessageJob.execute
would lead the code injection vulnerability.
@sergeykad Cleaning security reports cannot be done, in general, by purging all suspects or by suppressing their detection. In the future, the use of any coding pattern or component could be framed into a set of purpose statements such as intended input source ("configuration file" or "web request"), relation to other sub-projects ("exemplifies a hand-coded task in using the other project" or "implements the interface" or "sends a request to the other project"). In this particular case replacing convoluted sample tasks with simple ones such as those creating files or sending web requests to a specific REST endpoint could satisfy the shallow automated scanners. But offloading the deficiencies of the scanners onto the shoulders of the code creators does not seem fair or feasible in general. Businesses can work on their human-controlled risk detection systems or finance a verifiable, enforceable component and code pattern usage programming framework. |
Just a quick mention, do we have a complete security reporting process? Quartz has a large number of downstream users, and any discussions regarding security should be conducted privately rather than in a public place like GitHub Issues. |
@ilatypov i wish it worked like that. we have a seperate part of our organisation (Audit or whatever) which is forcing us to fix this. what a stupid system |
I see there is a RC version: Quartz 2.4.0 RC2, will it resolve this vulnerability? |
@pcgeng yes it fixes it for me (that was the recommended version provided by my tooling), but I'm getting lots of "Cast Exceptions for FileScanner" when trying to use it. The jobs work as expected, it just clutters my logs a LOT |
So to trigger this vulnerability you need
Am I reading this correctly? |
We've updated to RC2 and used the OWASP Dependency-Check maven plugin and RC2 is still identified with known vulnerabilities: |
Is there a deadline to launch this fix? |
Any idea of the date when the release build including CVE-2023-39017 fix will be published for v2.3.x? |
Is this fixed by 2.4.0? |
Validating parameters during function call passing can solve the problem, right? |
Affected Version
The latest version 2.3.2 and below.
Describe the vulnerability
There is a method,
org.quartz.jobs.ee.jms.SendQueueMessageJob.execute(JobExecutionContext)
, designed to send a jms message. However, passing an unchecked argument to this API can lead to the execution of arbitrary commands. For instance, following codes can lead to the execution of arbitrary commands from attackers:Root Cause and Potential Danger
The API is given more power than it should have, namely to just execute
lookup
without checking it. It violates the principle of least privilege. In this case, developers are not aware that the API used to send a jms message could execute arbitrary commands, leading to insufficient parameter validation and command execution.We believe that this kind of implementation obscures the responsibility of security checks between the developers and the users of libraries, which has been confirmed by some developers. This issue is similar to the previously well-known Log4j2 vulnerability, where few developers knew that logging APIs could result in JNDI injection.
To Reproduce
First, establish an LDAP server and provide malicious code. Then, just execute above codes would reproduce it.
Fix Suggestion
Filter LDAP, RMI and related protocols when using
lookup
.The text was updated successfully, but these errors were encountered: