CVE-2022-35912: Grails databinding Remote Code Execution Vulnerability
CRITICALCVE-2022-35912 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (General Security Weakness) affecting Grails databinding libraries in the Maven ecosystem. The issue involves grails framework remote code execution via data binding. Remediation is available by upgrading affected packages to version 3.3.15, 4.1.1, 5.1.9, 5.2.1.
CVE-2022-35912 at a Glance
Security Impact
CVSS: 9.8
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:H/I:H/A:H).
How to Fix CVE-2022-35912
To remediate this vulnerability, upgrade all affected Grails databinding dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-databinding</artifactId>
<version>3.3.15</version>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-databinding</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-databinding</artifactId>
<version>5.1.9</version>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-databinding</artifactId>
<version>5.2.1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.grails
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-35912, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.grails
Analyze the terminal output to locate any version of Grails databinding in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.15), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.grails 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 General Security Weakness. In Grails databinding, 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-2022-35912 Affected Grails databinding Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.grails:grails-databinding
|
Maven |
≥ 3.3.10
< 3.3.15
|
3.3.15
|
|
org.grails:grails-databinding
|
Maven |
≥ 4.0.0
< 4.1.1
|
4.1.1
|
|
org.grails:grails-databinding
|
Maven |
≥ 5.0.0
< 5.1.9
|
5.1.9
|
|
org.grails:grails-databinding
|
Maven |
≥ 5.2.0
< 5.2.1
All 1 versions
5.2.0
|
5.2.1
|
References
Frequently Asked Questions
What is CVE-2022-35912?
Which Grails databinding versions are affected?
What version fixes CVE-2022-35912?
Is grails-databinding affected?
What is the CVSS score of CVE-2022-35912?
What CWE is associated with CVE-2022-35912?
How can I check Maven dependencies for CVE-2022-35912?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6rh6-x8ww-9h97",
"modified" : "2022-07-29T17:38:35Z",
"published" : "2022-07-21T21:38:28Z",
"aliases" : [ "CVE-2022-35912" ],
"summary" : "Grails framework Remote Code Execution via Data Binding",
"details" : "### Impact\nA vulnerability has been discovered in the Grails data-binding logic which allows for Remote Code Execution in a Grails application. This exploit requires the application to be running on Java 8, either deployed as a WAR to a servlet container, or an executable JAR. \n\n### Patches\nGrails framework versions 5.2.1, 5.1.9, 4.1.1, and 3.3.15\n\n### References\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-35912\nhttps://grails.org/blog/2022-07-18-rce-vulnerability.html\n\n### For more information\nIf you have any questions or comments about this advisory:\n* https://grails.org/blog/2022-07-18-rce-vulnerability.html\n* https://github.com/grails/grails-core/issues/12626\n* Email us at [info@grails.org](mailto:info@grails.org)\n\n### Credit\n\nThis vulnerability was discovered by [meizjm3i](https://github.com/meizjm3i) and [codeplutos](https://github.com/codeplutos) of AntGroup FG Security Lab\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.grails:grails-databinding"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.3.10"
}, {
"fixed" : "3.3.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.grails:grails-databinding"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.1.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.grails:grails-databinding"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.1.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.grails:grails-databinding"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.2.0"
}, {
"fixed" : "5.2.1"
} ]
} ],
"versions" : [ "5.2.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/grails/grails-core/security/advisories/GHSA-6rh6-x8ww-9h97"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-35912"
}, {
"type" : "WEB",
"url" : "https://github.com/grails/grails-core/issues/12626"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/grails/grails-core"
}, {
"type" : "WEB",
"url" : "https://grails.org/blog/2022-07-18-rce-vulnerability.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2022/07/20/4"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-21T21:38:28Z",
"nvd_published_at" : "2022-07-19T16:15:00Z"
}
}