CVE-2021-41269: Cron utils Critical Vulnerability Found Vulnerability

CRITICAL
Advisory Identifier: GHSA-p9m8-27x8-rg87
CVSS 10.0
CWE-94
Published
Advisory Summary

CVE-2021-41269 is a CRITICAL (CVSS 10.0) critical vulnerability found vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Cron utils libraries in the Maven ecosystem. The issue involves critical vulnerability found in cron-utils. Remediation is available by upgrading affected packages to version 9.1.6.

CVE-2021-41269 at a Glance

CVE Identifier CVE-2021-41269
GHSA Identifier GHSA-p9m8-27x8-rg87
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Cron utils
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:C/C:H/I:H/A:H).

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

How to Fix CVE-2021-41269

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.6
<dependency>
    <groupId>com.cronutils</groupId>
    <artifactId>cron-utils</artifactId>
    <version>9.1.6</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-2021-41269, 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.6), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. 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 was released. Please upgrade to version 9.1.6. ### 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 the [cron-utils Github repository](https://github.com/jmrozanec/cron-utils)

CVE-2021-41269 Affected Cron utils Versions

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

References

Frequently Asked Questions

What is CVE-2021-41269?
CVE-2021-41269 is a security vulnerability in Cron utils involving Critical vulnerability found in cron-utils under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Cron utils versions are affected?
Affected versions include releases prior to 9.1.6 across affected packages: com.cronutils:cron-utils.
What version fixes CVE-2021-41269?
Upgrading to 9.1.6 (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.6. Upgrade your dependency to 9.1.6 or later.
What is the CVSS score of CVE-2021-41269?
CVE-2021-41269 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2021-41269?
CVE-2021-41269 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2021-41269?
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-p9m8-27x8-rg87",
  "modified" : "2021-11-15T22:23:17Z",
  "published" : "2021-11-15T23:27:11Z",
  "aliases" : [ "CVE-2021-41269" ],
  "summary" : "Critical vulnerability found 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 was released. Please upgrade to version 9.1.6.\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\nOpen an issue in the [cron-utils Github repository](https://github.com/jmrozanec/cron-utils)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.cronutils:cron-utils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/security/advisories/GHSA-p9m8-27x8-rg87"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41269"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/issues/461"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/commit/cfd2880f80e62ea74b92fa83474c2aabdb9899da"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jmrozanec/cron-utils/commit/d6707503ec2f20947f79e38f861dba93b39df9da"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jmrozanec/cron-utils"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-15T22:23:17Z",
    "nvd_published_at" : "2021-11-15T21:15:00Z"
  }
}