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
{{ message }}
Repository navigation
java.lang.StackOverflowError in org.json.JSONTokener.nextValue::JSONTokener.java:431 json-java 20210307 #654
java.lang.StackOverflowError in org.json.JSONTokener.nextValue::JSONTokener.java:431 json-java 20210307
This vulnerability is of java.lang.StackOverflowError, and can be triggered in latest version json-java (20210307).
It is caused by triggering infinite recursive function calls under crafted user input file and can be used for attackers to launch DoS (Denial of Service) attack to exhaust the system resources for any java program that uses this library (CWE-121: Stack-based Buffer Overflow).
Likely, the root cause of this crash is in org.json.JSONTokener.nextValue::JSONTokener.java:431.
See more detail from the following crash stack.
Hi @stleary, I'm the collaborator of @ZanderHuang. Sorry for the late reply. Here is the POC code which makes the test input as a base64 text. Can you reopen this issue? Thank you!
Hi @johnjaylward , are you willing to help us to request a CVE ID through GitHub Security Advisories for this bug, which can cause Denial of Service. You can follow this tutorial to use it to manage your bug fixes and alert any downstream dependencies of the issue so they can patch immediately if using the broken release. Thanks for your help!
Activity
johnjaylward commentedon Dec 13, 2021
Please include any POC code in the issue and not as a separate download.
johnjaylward commentedon Dec 13, 2021
Also, do not send in zip files. Send uncompressed files only
ZanderHuang commentedon Dec 13, 2021
@johnjaylward The test program is as follows:
The poc file is in binary so I cannot just simply paste it here.
You can download the single file from the link below:
https://drive.google.com/file/d/1Q45fXzDOWMqIAhNyaLKyoKDaNePi5THz/view?usp=sharing
johnjaylward commentedon Dec 13, 2021
Sorry, I'm not interested in downloading random binary files. If you can make a simple test input as a text file, that would be best.
stleary commentedon Dec 31, 2021
Closed due to lack of response.
Han0nly commentedon Jan 26, 2022
Hi @stleary, I'm the collaborator of @ZanderHuang. Sorry for the late reply. Here is the POC code which makes the test input as a base64 text. Can you reopen this issue? Thank you!
johnjaylward commentedon Jan 26, 2022
Thank you for the test input. I'll take a look at this.
stleary commentedon Jan 26, 2022
Re-opened
Han0nly commentedon Jan 27, 2022
Hi @johnjaylward , are you willing to help us to request a CVE ID through GitHub Security Advisories for this bug, which can cause Denial of Service. You can follow this tutorial to use it to manage your bug fixes and alert any downstream dependencies of the issue so they can patch immediately if using the broken release. Thanks for your help!
Merge pull request #660 from johnjaylward/Issue654StackOverflowError
Bumps json schema validator to 1.14.1 (#21116)
Bump org.json dependency