# CVE-2010-1622: Improper Control of Generation of Code ('Code Injection') in Spring Framework

> Remote attackers can execute arbitrary code by sending a crafted HTTP request to applications using the Spring Framework.

- **Severity:** Medium 6.0 (`AV:N/AC:M/Au:S/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Jun 2010
- **Updated:** 7 Aug 2024
- **Also known as:** GHSA-vpr3-f594-mg5g, RHSA-2011:0175

## What is CVE-2010-1622?

CVE-2010-1622 is a medium-severity code injection vulnerability in Oracle Fusion Middleware, published on 21 Jun 2010. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

SpringSource Spring Framework 2.5.x before 2.5.6.SEC02, 2.5.7 before 2.5.7.SR01, and 3.0.x before 3.0.3 allows remote attackers to execute arbitrary code via an HTTP request containing class.classLoader.URLs[0]=jar: followed by a URL of a crafted .jar file.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2010-1622?

4 open source packages ship an affected version, including org.springframework:spring. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework:spring` | Maven | From 2.5.0 | 2.5.7 |
| `org.springframework:spring` | Maven | From 2.5.0 | 2.5.7 |
| `org.springframework:spring` | Maven | From 3.0.0 | 3.0.3 |
| `org.springframework:spring` | Maven | From 3.0.0 | 3.0.3 |
| `jboss-wfk-1.0.0-uninstall` | Red Hat:jboss_web_framework_kit:1::el4 | All versions | 0:1.0.0-3.ep5.el4 |

Products: Oracle Fusion Middleware, Springsource Spring Framework.

## How do I fix CVE-2010-1622?

Upgrade org.springframework:spring to a fixed version for your release line: 2.5.7 or 3.0.3.

## Is CVE-2010-1622 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2010-1622 exists.

Public exploit code:

- CVE-2022-22965 - CVE-2010-1622 redux (github_poc): https://github.com/DDuarte/springshell-rce-poc
- cve-2010-1622 Learning Environment (github_poc): https://github.com/E-bounce/cve-2010-1622_learning_environment
- Spring Framework - Arbitrary code Execution (exploitdb)
- Threat Intelligence on Zero-Day for Spring4Shell (CVE-2010-1622) (github_poc): https://github.com/strainerart/Spring4Shell
- Spring-CVE-2010-1622 (github_poc): https://github.com/HandsomeCat00/Spring-CVE-2010-1622

## Other vulnerabilities in Oracle Fusion Middleware

- [CVE-2012-1710](https://insights.sbomify.com/CVE-2012-1710/): Oracle Fusion Middleware Unspecified (critical 9.8, exploited in the wild)
- [CVE-2012-3152](https://insights.sbomify.com/CVE-2012-3152/): Oracle Fusion Middleware Unspecified (critical 9.1, exploited in the wild)
- [CVE-2012-0518](https://insights.sbomify.com/CVE-2012-0518/): Oracle Fusion Middleware Unspecified (medium 4.7, exploited in the wild)
- [CVE-2013-2380](https://insights.sbomify.com/CVE-2013-2380/): Other in n/a (critical 10.0)
- [CVE-2012-3135](https://insights.sbomify.com/CVE-2012-3135/): Other in n/a (critical 10.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2010-1622 and fix it if it is affected.

What it is: CVE-2010-1622 is a medium-severity code injection vulnerability in Oracle Fusion Middleware, published on 21 Jun 2010. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2010-1622 exists.

Affected packages and fixed versions:
- org.springframework:spring (Maven): affected from 2.5.0; fixed in 2.5.7
- org.springframework:spring (Maven): affected from 2.5.0; fixed in 2.5.7
- org.springframework:spring (Maven): affected from 3.0.0; fixed in 3.0.3
- org.springframework:spring (Maven): affected from 3.0.0; fixed in 3.0.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2010-1622/ (Markdown: https://insights.sbomify.com/CVE-2010-1622/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2010-1622
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2010-1622
- OSV: https://osv.dev/vulnerability/CVE-2010-1622

---
From sbomify Insights: https://insights.sbomify.com/CVE-2010-1622/
Summaries are generated and may contain mistakes; the official description above is the record.
