CVE-2020-26238: Cron utils Template Injection Vulnerability

CRITICAL
Advisory Identifier: GHSA-pfj3-56hm-jwq5
CVSS 7.9
CWE-74
Published
Advisory Summary

CVE-2020-26238 is a CRITICAL (CVSS 7.9) template injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Cron utils libraries in the Maven ecosystem. The issue involves template injection in cron-utils. Remediation is available by upgrading affected packages to version 9.1.3.

CVE-2020-26238 at a Glance

CVE Identifier CVE-2020-26238
GHSA Identifier GHSA-pfj3-56hm-jwq5
Severity CRITICAL
CVSS v3.1 Base Score 7.9
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Cron utils
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2020-26238

To remediate this vulnerability, upgrade all affected Cron utils dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.cronutils:cron-utils fixed: 9.1.3
<dependency>
    <groupId>com.cronutils</groupId>
    <artifactId>cron-utils</artifactId>
    <version>9.1.3</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.cronutils

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-26238, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.cronutils

Analyze the terminal output to locate any version of Cron utils in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.1.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.cronutils command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Cron utils, 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

### Impact A Template Injection was identified in cron-utils enabling attackers to inject arbitrary Java EL expressions, leading to unauthenticated Remote Code Execution (RCE) vulnerability. Versions up to 9.1.2 are susceptible to this vulnerability. Please note, that only projects using the @Cron annotation to validate untrusted Cron expressions are affected. ### Patches The issue was patched and a new version released. Please upgrade to version 9.1.3. ### Workarounds There are no known workarounds up to this moment. ### References A description of the issue is provided in [issue 461](https://github.com/jmrozanec/cron-utils/issues/461) ### For more information If you have any questions or comments about this advisory: * Open an issue in [cron-utils Github repository](https://github.com/jmrozanec/cron-utils)

CVE-2020-26238 Affected Cron utils Versions

1 component(s)
Fixed Versions:
9.1.3
Product / Package Ecosystem Affected Versions Fixed Version
com.cronutils:cron-utils
Maven
< 9.1.3
9.1.3

References

GitHub Advisory / Wiki ADVISORY
https://github.com/jmrozanec/cron-utils/security/advisories/GHSA-pfj3-56hm-jwq5
NVD — CVE-2020-26238 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-26238
Cron utils Source Repository REPOSITORY
https://github.com/jmrozanec/cron-utils/issues/461
Security Fix Commit FIX COMMIT
https://github.com/jmrozanec/cron-utils/commit/4cf373f7352f5d95f0bf6512af8af326b31c835e
lists.apache.org/thread.html/r390bb7... WEB
https://lists.apache.org/thread.html/r390bb7630b7ea8f02bf7adbbe69c0ae8b562c527d663c543d965f959@%3Cgitbox.hive.apache.org%3E
lists.apache.org/thread.html/r432a69... WEB
https://lists.apache.org/thread.html/r432a69a1a85cbcb1f1bad2aa0fbfce0367bf894bf917f6ed7118e7f0@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r50e1b5... WEB
https://lists.apache.org/thread.html/r50e1b5544c37e408ed7e9a958b28237b1cb9660ba2b3dba46f343e23@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r5f601d... WEB
https://lists.apache.org/thread.html/r5f601d15292e3302ad0ae0e89527029546945b1cd5837af7e838d354@%3Cdev.hive.apache.org%3E
lists.apache.org/thread.html/r71083c... WEB
https://lists.apache.org/thread.html/r71083c759dc627f198571b3d48b6745fe798b1d53c34f7ef8de9e7dd@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r737406... WEB
https://lists.apache.org/thread.html/r737406bc17d49ffe8fe6a8828d390ee0a02e45e5a5b4f931180b9a93@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r855aea... WEB
https://lists.apache.org/thread.html/r855aead591697dc2e85faf66c99036e49f492431940b78d4e6d895b5@%3Cgitbox.hive.apache.org%3E
lists.apache.org/thread.html/r96937f... WEB
https://lists.apache.org/thread.html/r96937fc9c82f3201b59311c067e97bce71123944f93102169a95bf5c@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r9ae9a9... WEB
https://lists.apache.org/thread.html/r9ae9a9fb1c8e2bf95c676e7e4cd06aa04f0a3a8a9ec1a6b787afb00f@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/ra9e812... WEB
https://lists.apache.org/thread.html/ra9e81244d323898dde3c979dd7df6996e4037d14a01b6629ea443548@%3Cissues.hive.apache.org%3E

Frequently Asked Questions

What is CVE-2020-26238?
CVE-2020-26238 is a security vulnerability in Cron utils involving Template injection in cron-utils under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Cron utils versions are affected?
Affected versions include releases prior to 9.1.3 across affected packages: com.cronutils:cron-utils.
What version fixes CVE-2020-26238?
Upgrading to 9.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cron-utils affected?
Yes, com.cronutils:cron-utils is affected in releases prior to 9.1.3. Upgrade your dependency to 9.1.3 or later.
What is the CVSS score of CVE-2020-26238?
CVE-2020-26238 has a CVSS v3.1 base score of 7.9 (CRITICAL) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-26238?
CVE-2020-26238 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Maven dependencies for CVE-2020-26238?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.cronutils'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfj3-56hm-jwq5",
  "modified" : "2021-01-07T22:39:49Z",
  "published" : "2020-11-24T23:48:38Z",
  "aliases" : [ "CVE-2020-26238" ],
  "summary" : "Template injection in cron-utils",
  "details" : "### Impact\nA Template Injection was identified in cron-utils enabling attackers to inject arbitrary Java EL expressions, leading to unauthenticated Remote Code Execution (RCE) vulnerability. Versions up to 9.1.2 are susceptible to this vulnerability. Please note, that only projects using the @Cron annotation to validate untrusted Cron expressions are affected.\n\n### Patches\nThe issue was patched and a new version released. Please upgrade to version 9.1.3.\n\n### Workarounds\nThere are no known workarounds up to this moment.\n\n### References\nA description of the issue is provided in [issue 461](https://github.com/jmrozanec/cron-utils/issues/461)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [cron-utils Github repository](https://github.com/jmrozanec/cron-utils)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.cronutils:cron-utils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/security/advisories/GHSA-pfj3-56hm-jwq5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26238"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/issues/461"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/commit/4cf373f7352f5d95f0bf6512af8af326b31c835e"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r390bb7630b7ea8f02bf7adbbe69c0ae8b562c527d663c543d965f959@%3Cgitbox.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r432a69a1a85cbcb1f1bad2aa0fbfce0367bf894bf917f6ed7118e7f0@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r50e1b5544c37e408ed7e9a958b28237b1cb9660ba2b3dba46f343e23@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r5f601d15292e3302ad0ae0e89527029546945b1cd5837af7e838d354@%3Cdev.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r71083c759dc627f198571b3d48b6745fe798b1d53c34f7ef8de9e7dd@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r737406bc17d49ffe8fe6a8828d390ee0a02e45e5a5b4f931180b9a93@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r855aead591697dc2e85faf66c99036e49f492431940b78d4e6d895b5@%3Cgitbox.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r96937fc9c82f3201b59311c067e97bce71123944f93102169a95bf5c@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9ae9a9fb1c8e2bf95c676e7e4cd06aa04f0a3a8a9ec1a6b787afb00f@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/ra9e81244d323898dde3c979dd7df6996e4037d14a01b6629ea443548@%3Cissues.hive.apache.org%3E"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-11-24T23:48:26Z",
    "nvd_published_at" : "2020-11-25T00:15:00Z"
  }
}