CVE-2020-4072: Generator jhipster kotlin Log Forging Vulnerability
MODERATECVE-2020-4072 is a MODERATE (CVSS 5.3) log forging vulnerability (CWE-117: Improper Output Neutralization for Logs) affecting Generator jhipster kotlin libraries in the npm ecosystem. The issue involves log forging in generator-jhipster-kotlin. Remediation is available by upgrading affected packages to version 1.7.0.
CVE-2020-4072 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2020-4072
To remediate this vulnerability, upgrade all affected Generator jhipster kotlin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install generator-jhipster-kotlin@1.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls generator-jhipster-kotlin
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-4072, inspect your project dependencies using npm:
npm ls generator-jhipster-kotlin
Analyze the terminal output to locate any version of Generator jhipster kotlin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.0), your application is affected.
Note: The npm ls generator-jhipster-kotlin command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-117: Improper Output Neutralization for Logs, where the product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file. In Generator jhipster kotlin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-4072 Affected Generator jhipster kotlin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
generator-jhipster-kotlin
|
npm |
≥ 1.6.0
< 1.7.0
All 1 versions
1.6.0
|
1.7.0
|
References
Frequently Asked Questions
What is CVE-2020-4072?
Which Generator jhipster kotlin versions are affected?
What version fixes CVE-2020-4072?
Is generator-jhipster-kotlin affected?
What is the CVSS score of CVE-2020-4072?
What CWE is associated with CVE-2020-4072?
How can I check npm dependencies for CVE-2020-4072?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pfxf-wh96-fvjc",
"modified" : "2021-01-07T23:50:00Z",
"published" : "2020-06-25T20:02:51Z",
"aliases" : [ "CVE-2020-4072" ],
"summary" : "Log Forging in generator-jhipster-kotlin",
"details" : "### Impact\n\nWe log the mail for invalid password reset attempts. \nAs the email is provided by a user and the api is public this can be used by an attacker to forge log entries.\nThis is vulnerable to https://cwe.mitre.org/data/definitions/117.html\n\nThis problem affects only application generated with jwt or session authentication. Applications using oauth are not vulnerable.\n\n### Patches\n\nversion 1.7.0.\n\n### Workarounds\n\nIn `AccountResource.kt` you should change the line\n\n```kotlin\n log.warn(\"Password reset requested for non existing mail '$mail'\");\n```\n\nto \n\n```kotlin\n log.warn(\"Password reset requested for non existing mail\");\n```\n\n### References\n\n* https://cwe.mitre.org/data/definitions/117.html\n* https://owasp.org/www-community/attacks/Log_Injection\n* https://www.baeldung.com/jvm-log-forging\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [jhipster kotlin](https://github.com/jhipster/jhipster-kotlin)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "generator-jhipster-kotlin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.6.0"
}, {
"fixed" : "1.7.0"
} ]
} ],
"versions" : [ "1.6.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jhipster/jhipster-kotlin/security/advisories/GHSA-pfxf-wh96-fvjc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-4072"
}, {
"type" : "WEB",
"url" : "https://github.com/jhipster/jhipster-kotlin/commit/426ccab85e7e0da562643200637b99b6a2a99449"
}, {
"type" : "WEB",
"url" : "https://owasp.org/www-community/attacks/Log_Injection"
}, {
"type" : "WEB",
"url" : "https://www.baeldung.com/jvm-log-forging"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-117" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-25T20:02:31Z",
"nvd_published_at" : null
}
}