# CVE-2010-4476: Apache Tomcat affected by infinite loop in Double.parseDouble method in Java Runtime Environment

> Remote attackers can cause a denial of service in Java applications by sending a crafted string that triggers an infinite loop during double parsing.

- **Severity:** Medium 5.0 (`AV:N/AC:L/Au:N/C:N/I:N/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:** 17 Feb 2011
- **Updated:** 7 Aug 2024
- **Also known as:** DSA-2161-1, DSA-2161-2, GHSA-gvgc-rxmh-5hvw, RHSA-2011:0210, RHSA-2011:0211, RHSA-2011:0214, RHSA-2011:0290, RHSA-2011:0291, RHSA-2011:0292, RHSA-2011:0299, RHSA-2011:0336, RHSA-2011:0349

## What is CVE-2010-4476?

CVE-2010-4476 is a medium-severity denial of service vulnerability in Sun Jdk, published on 17 Feb 2011. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The Double.parseDouble method in Java Runtime Environment (JRE) in Oracle Java SE and Java for Business 6 Update 23 and earlier, 5.0 Update 27 and earlier, and 1.4.2_29 and earlier, as used in OpenJDK, Apache, JBossweb, and other products, allows remote attackers to cause a denial of service via a crafted string that triggers an infinite loop of estimations during conversion to a double-precision binary floating-point number, as demonstrated using 2.2250738585072012e-308.

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

6 open source packages ship an affected version, including org.apache.tomcat:tomcat. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.tomcat:tomcat` | Maven | From 5.5.0 | 5.5.33 |
| `org.apache.tomcat:tomcat` | Maven | From 5.5.0 | 5.5.33 |
| `org.apache.tomcat:tomcat` | Maven | From 6.0.0 | 6.0.32 |
| `org.apache.tomcat:tomcat` | Maven | From 6.0.0 | 6.0.32 |
| `org.apache.tomcat:tomcat` | Maven | From 7.0.0 | 7.0.7 |
| `org.apache.tomcat:tomcat` | Maven | From 7.0.0 | 7.0.7 |
| `java-1.6.0-openjdk` | Red Hat:enterprise_linux:5::server | All versions | 1:1.6.0.0-1.18.b17.el5 |
| `java-1.6.0-openjdk-debuginfo` | Red Hat:enterprise_linux:5::server | All versions | 1:1.6.0.0-1.18.b17.el5 |
| `java-1.6.0-openjdk-demo` | Red Hat:enterprise_linux:5::server | All versions | 1:1.6.0.0-1.18.b17.el5 |
| `java-1.6.0-openjdk-devel` | Red Hat:enterprise_linux:5::server | All versions | 1:1.6.0.0-1.18.b17.el5 |
| `java-1.6.0-openjdk-javadoc` | Red Hat:enterprise_linux:5::server | All versions | 1:1.6.0.0-1.18.b17.el5 |
| `java-1.6.0-openjdk-src` | Red Hat:enterprise_linux:5::server | All versions | 1:1.6.0.0-1.18.b17.el5 |
| `tomcat5` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-admin-webapps` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-common-lib` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-debuginfo` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-jasper` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-jasper-javadoc` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-jsp-2.0-api` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-jsp-2.0-api-javadoc` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-server-lib` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-servlet-2.4-api` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-servlet-2.4-api-javadoc` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `tomcat5-webapps` | Red Hat:enterprise_linux:5::server | All versions | 0:5.5.23-0jpp.17.el5_6 |
| `java-1.6.0-openjdk` | Red Hat:enterprise_linux:6::client | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-debuginfo` | Red Hat:enterprise_linux:6::client | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-demo` | Red Hat:enterprise_linux:6::client | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-devel` | Red Hat:enterprise_linux:6::client | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-javadoc` | Red Hat:enterprise_linux:6::client | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-src` | Red Hat:enterprise_linux:6::client | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk` | Red Hat:enterprise_linux:6::computenode | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-debuginfo` | Red Hat:enterprise_linux:6::computenode | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-demo` | Red Hat:enterprise_linux:6::computenode | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-devel` | Red Hat:enterprise_linux:6::computenode | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-javadoc` | Red Hat:enterprise_linux:6::computenode | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-src` | Red Hat:enterprise_linux:6::computenode | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk` | Red Hat:enterprise_linux:6::server | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-debuginfo` | Red Hat:enterprise_linux:6::server | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-demo` | Red Hat:enterprise_linux:6::server | All versions | 1:1.6.0.0-1.36.b17.el6_0 |
| `java-1.6.0-openjdk-devel` | Red Hat:enterprise_linux:6::server | All versions | 1:1.6.0.0-1.36.b17.el6_0 |

Products: Sun Jdk, Sun Jre, Sun Sdk.

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

Upgrade org.apache.tomcat:tomcat to a fixed version for your release line: 5.5.33, 6.0.32 or 7.0.7.

## Is CVE-2010-4476 being exploited?

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

Public exploit code:

- http://www.oracle.com/technetwork/topics/security/alert-cve-2010-4476-305811.html (github_poc): https://github.com/grzegorzblaszczyk/CVE-2010-4476-check
- Oracle Java - Floating-Point Value Denial of Service (exploitdb)

## Other vulnerabilities in Sun Jdk

- [CVE-2011-3521](https://insights.sbomify.com/CVE-2011-3521/): Deserialization in n/a (critical 10.0)
- [CVE-2011-3548](https://insights.sbomify.com/CVE-2011-3548/): Other in n/a (critical 10.0)
- [CVE-2011-3549](https://insights.sbomify.com/CVE-2011-3549/): Other in n/a (critical 10.0)
- [CVE-2011-3554](https://insights.sbomify.com/CVE-2011-3554/): Other in n/a (critical 10.0)
- [CVE-2011-0802](https://insights.sbomify.com/CVE-2011-0802/): Other in n/a (critical 10.0)

## Fix prompt for AI coding agents

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

What it is: CVE-2010-4476 is a medium-severity denial of service vulnerability in Sun Jdk, published on 17 Feb 2011. 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-4476 exists.

Affected packages and fixed versions:
- org.apache.tomcat:tomcat (Maven): affected from 5.5.0; fixed in 5.5.33
- org.apache.tomcat:tomcat (Maven): affected from 5.5.0; fixed in 5.5.33
- org.apache.tomcat:tomcat (Maven): affected from 6.0.0; fixed in 6.0.32
- org.apache.tomcat:tomcat (Maven): affected from 6.0.0; fixed in 6.0.32
- org.apache.tomcat:tomcat (Maven): affected from 7.0.0; fixed in 7.0.7
- org.apache.tomcat:tomcat (Maven): affected from 7.0.0; fixed in 7.0.7

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

## Sources

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

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