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
Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.qhelp
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,10 @@
3
3
"qhelp.dtd">
4
4
<qhelp>
5
5
<overview>
6
-
<p>This query detects instances of <code>RandomUtil.java</code> generated by a <ahref="https://www.jhipster.tech/">JHipster</a> version vulnerable to <ahref="https://github.com/jhipster/jhipster-kotlin/security/advisories/GHSA-j3rh-8vwq-wh84">CVE-2019-16303</a>.</p>
6
+
<p>This query detects instances of <code>RandomUtil.java</code> that were generated by a <ahref="https://www.jhipster.tech/">JHipster</a> version that is vulnerable to <ahref="https://github.com/jhipster/jhipster-kotlin/security/advisories/GHSA-j3rh-8vwq-wh84">CVE-2019-16303</a>.</p>
7
7
8
-
<p>Using one password reset token from your app combined with the proof of concept (POC) linked below, an attacker can determine all future password reset tokens to be generated by this server.
9
-
This allows an attacker to pick and choose what account they would like to takeover by sending account password reset requests for targeted accounts.</p>
8
+
<p>If an app uses <code>RandomUtil.java</code> generated by a vulnerable version of JHipster, attackers can request a password reset token and use this to predict the value of future reset tokens generated by this server.
9
+
Using this information, they can create a reset link that allows them to take over any account.</p>
@@ -26,24 +26,27 @@ This allows an attacker to pick and choose what account they would like to takeo
26
26
27
27
<recommendation>
28
28
29
-
<p>An automated refactoring <ahref="https://github.com/openrewrite/rewrite">rewrite</a> module <ahref="https://github.com/moderneinc/jhipster-cwe-338"> can be found here</a>.</p>
29
+
<p>You should refactor the <code>RandomUtil</code> class and replace every call to <code>RandomStringUtils.randomAlphaNumeric</code>. You could regenerate the class using the latest version of JHipster, or use an automated refactoring. For example, using the <ahref="https://github.com/moderneinc/jhipster-cwe-338">Patching JHipster CWE-338</a> for the <ahref="https://github.com/openrewrite/rewrite">Rewrite project</a>.
0 commit comments