# CVE-2011-2730: Improper Neutralization of Directives in Dynamically Evaluated Code in Spring Framework

> Remote attackers can obtain sensitive information via Expression Language injection in Spring Framework tags when EL support is enabled.

- **Severity:** High 7.5 (`AV:N/AC:L/Au:N/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:** 5 Dec 2012
- **Updated:** 6 Aug 2024
- **Also known as:** CLSA-2026-1781052740, DSA-2504-1, GHSA-wv88-pf73-x22p

## What is CVE-2011-2730?

CVE-2011-2730 is a high-severity vulnerability in n/a, published on 5 Dec 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

VMware SpringSource Spring Framework before 2.5.6.SEC03, 2.5.7.SR023, and 3.x before 3.0.6, when a container supports Expression Language (EL), evaluates EL expressions in tags twice, which allows remote attackers to obtain sensitive information via a (1) name attribute in a (a) spring:hasBindErrors tag; (2) path attribute in a (b) spring:bind or (c) spring:nestedpath tag; (3) arguments, (4) code, (5) text, (6) var, (7) scope, or (8) message attribute in a (d) spring:message or (e) spring:theme tag; or (9) var, (10) scope, or (11) value attribute in a (f) spring:transform tag, aka "Expression Language Injection."

Weakness: CWE-16

## Which versions are affected by CVE-2011-2730?

6 open source packages ship an affected version, including org.springframework:spring-core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework:spring-core` | Maven | All versions | 2.5.6.SEC03 |
| `org.springframework:spring-core` | Maven | All versions | 2.5.6.SEC03 |
| `org.springframework:spring-core` | Maven | From 2.5.7.SR0 | 2.5.7.SR023 |
| `org.springframework:spring-core` | Maven | From 2.5.7.SR0 | 2.5.7.SR023 |
| `org.springframework:spring-core` | Maven | From 3.0.0 | 3.0.6 |
| `org.springframework:spring-core` | Maven | From 3.0.0 | 3.0.6 |

Products: Springsource Spring Framework.

## How do I fix CVE-2011-2730?

Upgrade org.springframework:spring-core to a fixed version for your release line: 2.5.6.SEC03, 2.5.7.SR023 or 3.0.6.

## Is CVE-2011-2730 being exploited?

There is no known exploitation of CVE-2011-2730 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2014-0054](https://insights.sbomify.com/CVE-2014-0054/): Cross-Site Request Forgery in Spring Framework (medium 6.8)
- [CVE-2013-4152](https://insights.sbomify.com/CVE-2013-4152/): Cross-Site Request Forgery in Spring Framework (medium 6.8)
- [CVE-2013-7315](https://insights.sbomify.com/CVE-2013-7315/): Missing XML Validation in Spring Framework (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2011-2730 and fix it if it is affected.

What it is: CVE-2011-2730 is a high-severity vulnerability in n/a, published on 5 Dec 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2011-2730 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework:spring-core (Maven): affected all versions; fixed in 2.5.6.SEC03
- org.springframework:spring-core (Maven): affected all versions; fixed in 2.5.6.SEC03
- org.springframework:spring-core (Maven): affected from 2.5.7.SR0; fixed in 2.5.7.SR023
- org.springframework:spring-core (Maven): affected from 2.5.7.SR0; fixed in 2.5.7.SR023
- org.springframework:spring-core (Maven): affected from 3.0.0; fixed in 3.0.6
- org.springframework:spring-core (Maven): affected from 3.0.0; fixed in 3.0.6

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-2011-2730/ (Markdown: https://insights.sbomify.com/CVE-2011-2730/index.md)
```

## Sources

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

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