# CVE-2019-16303: JHipster Kotlin using insecure source of randomness \`RandomStringUtils\` before v1.2.0

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 3.67% (percentile 90, 2026-11-26)
- **CWE:** CWE-338
- **Aliases:** GHSA-j3rh-8vwq-wh84, GHSA-mwp6-j9wf-968c
- **Published:** 2019-09-13T21:33:25.000Z
- **Modified:** 2026-09-10T03:48:45.080Z

## Who should check

- Projects that depend on npm package generator-jhipster-kotlin (\< 1.2.0)
- Projects that depend on npm package generator-jhipster (\< 6.3.0)
- Anyone running n/a (versions: see the vendor advisory)

## Description

A class generated by the Generator in JHipster before 6.3.0 and JHipster Kotlin through 1.1.0 produces code that uses an insecure source of randomness (apache.commons.lang3 RandomStringUtils). This allows an attacker (if able to obtain their own password reset URL) to compute the value for all other password resets for other accounts, thus allowing privilege escalation or account takeover.

## Affected and fixed versions

- npm `generator-jhipster-kotlin`: affected \< 1.2.0; fixed 1.2.0 (osv)
- npm `generator-jhipster`: affected \< 6.3.0; fixed 6.3.0 (osv)
- n/a: see vendor advisory (nvd)

## Mitigation

- Upgrade generator-jhipster-kotlin to 1.2.0 or later.
- Upgrade generator-jhipster to 6.3.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2019-16303. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2019-16303.md
Affected: generator-jhipster-kotlin < 1.2.0; generator-jhipster < 6.3.0
Fixed in: 1.2.0, 6.3.0

Steps:
1. Search this machine and project for generator-jhipster-kotlin (npm), generator-jhipster (npm), n/a: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2019-16303 being exploited?

There is no confirmed exploitation: CVE-2019-16303 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 3.67% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2019-16303?

Critical: CVSS 9.8 (v3.1, scored by NVD). Remote, no login needed.

### Which versions are affected by CVE-2019-16303?

generator-jhipster-kotlin \< 1.2.0; generator-jhipster \< 6.3.0.

### Is there a fix for CVE-2019-16303?

Yes. Fixed in 1.2.0, 6.3.0. Upgrade generator-jhipster-kotlin to 1.2.0 or later. Upgrade generator-jhipster to 6.3.0 or later.

### How do I check if I'm affected by CVE-2019-16303?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/jhipster/generator-jhipster/security/advisories/GHSA-mwp6-j9wf-968c>
- vendor: <https://www.jhipster.tech/2019/09/13/jhipster-release-6.3.0.html>
- vendor: <https://github.com/jhipster/jhipster-kotlin/security/advisories/GHSA-j3rh-8vwq-wh84>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2019-16303>
- vendor: <https://github.com/advisories/GHSA-j3rh-8vwq-wh84>
- vendor: <https://github.com/advisories/GHSA-mwp6-j9wf-968c>
- patch: <https://github.com/jhipster/generator-jhipster/commit/88448b85fd3e8e49df103f0061359037c2c68ea7>
- patch: <https://github.com/jhipster/jhipster-kotlin/commit/deec3587ef7721cf5de5b960d43e9b68beff6193>
- exploit: <https://github.com/jhipster/generator-jhipster/issues/10401>
- exploit: <https://github.com/jhipster/jhipster-kotlin/issues/183>
- other: <https://lists.apache.org/thread.html/r6d243e7e3f25daeb242dacf3def411fba32a9388d3ff84918cb28ddd%40%3Cissues.commons.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rc87fa35a48b5d70b06af6fb81785ed82e82686eb83307aae6d250dc9%40%3Cissues.commons.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rc3f00f5d3d2ec0e2381a3b9096d5f5b4d46ec1587ee7e251a3dbb897%40%3Cissues.commons.apache.org%3E>
- other: <https://github.com/jhipster/generator-jhipster>
- other: <https://lists.apache.org/thread.html/r6d243e7e3f25daeb242dacf3def411fba32a9388d3ff84918cb28ddd@%3Cissues.commons.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rc3f00f5d3d2ec0e2381a3b9096d5f5b4d46ec1587ee7e251a3dbb897@%3Cissues.commons.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rc87fa35a48b5d70b06af6fb81785ed82e82686eb83307aae6d250dc9@%3Cissues.commons.apache.org%3E>
- other: <https://snyk.io/vuln/SNYK-JS-GENERATORJHIPSTER-466980>
- other: <https://www.npmjs.com/advisories/1187>
- other: <https://www.npmjs.com/advisories/1188>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2019-16303>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-j3rh-8vwq-wh84> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-mwp6-j9wf-968c> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2019-16303> · JSON: <https://flawdb.com/api/v1/entries/CVE-2019-16303>
