Every CVE Search/ Get API key

CVE-2024-21742

Apache James Mime4J: Mime4J DOM header injection

5.3 MediumFix available

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
None

Exploit likelihood

1.09%Up 1.0 points since Feb 28, 2024
90%50%10%1%

What each source reports

NVD Score used 5.3

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
CVE-2024-21742
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-74
Updated
2026-11-02
CVE List 5.3

Apache James Mime4J: Mime4J DOM header injection

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
CVE-2024-21742
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-74
Updated
2026-11-02
EUVDEUVD-2024-0666 5.3

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
EUVD-2024-0666
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-jw7r-rxff-gv24 5.3

Apache James MIME4J improper input validation vulnerability

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
GHSA-jw7r-rxff-gv24
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-20, CWE-74
Updated
2026-11-02
OSV 5.3

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
CVE-2024-21742
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVDEBIAN-CVE-2024-21742 5.3

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
DEBIAN-CVE-2024-21742
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
Show 10 moreShow less
OSVGHSA-jw7r-rxff-gv24 5.3

Apache James MIME4J improper input validation vulnerability

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
GHSA-jw7r-rxff-gv24
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-20, CWE-74
Updated
2026-11-02
OSVOESA-2024-1333 5.6

apache-mime4j security update

Java stream based MIME message parser.

Security Fix(es):

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages. (CVE-2024-21742)

Record
OESA-2024-1333
CVSS 3.1
5.6 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVOESA-2024-1475 5.6

apache-mime4j security update

Java stream based MIME message parser.

Security Fix(es):

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages. (CVE-2024-21742)

Record
OESA-2024-1475
CVSS 3.1
5.6 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVOESA-2024-1476 5.6

apache-mime4j security update

Java stream based MIME message parser.

Security Fix(es):

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages. (CVE-2024-21742)

Record
OESA-2024-1476
CVSS 3.1
5.6 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVOESA-2024-1477 5.6

apache-mime4j security update

Java stream based MIME message parser.

Security Fix(es):

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages. (CVE-2024-21742)

Record
OESA-2024-1477
CVSS 3.1
5.6 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVOESA-2024-1478 5.6

apache-mime4j security update

Java stream based MIME message parser.

Security Fix(es):

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages. (CVE-2024-21742)

Record
OESA-2024-1478
CVSS 3.1
5.6 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVOESA-2024-1479 5.6

apache-mime4j security update

Java stream based MIME message parser.

Security Fix(es):

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages. (CVE-2024-21742)

Record
OESA-2024-1479
CVSS 3.1
5.6 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVRHLW-2026-0436667cee7724a6 5.3

Lightwell Security Advisory: apache-mime4j-dom 0.8.9.rhlw-00004

Red Hat Lightwell has released org.apache.james:apache-mime4j-dom 0.8.9.rhlw-00004 with a backported security fix.

CVE-2024-21742: Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

This patched artifact is a drop-in replacement for org.apache.james:apache-mime4j-dom 0.8.9 from Maven Central.

Record
RHLW-2026-0436667cee7724a6
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVRHLW-2026-e78d277bde69c3f5 5.3

Lightwell Security Advisory: apache-mime4j-core 0.8.9.rhlw-00004

Red Hat Lightwell has released org.apache.james:apache-mime4j-core 0.8.9.rhlw-00004 with a backported security fix.

CVE-2024-21742: Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

This patched artifact is a drop-in replacement for org.apache.james:apache-mime4j-core 0.8.9 from Maven Central.

Record
RHLW-2026-e78d277bde69c3f5
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2024-21742 5.3

Improper input validation allows for header injection in MIME4J library when using MIME4J DOM for composing message. This can be exploited by an attacker to add unintended headers to MIME messages.

Record
UBUNTU-CVE-2024-21742
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.apache.james:apache-mime4j-core
Maven
before 0.8.10
0.8.10
apache-mime4j
Debian:12
All versions, plus listed versions
0.8.10-10.8.11-10.8.12-10.8.13-10.8.2-1
None known
apache-mime4j
Debian:13
before 0.8.10-1
0.8.10-1
apache-mime4j
Debian:14
before 0.8.10-1
0.8.10-1
org.apache.james:apache-mime4j-core
Maven
before 0.8.10, plus listed versions
0.70.7.10.7.20.8.00.8.1
Show 8 moreShow less
0.8.20.8.30.8.40.8.50.8.60.8.70.8.80.8.9
0.8.10
apache-mime4j
openEuler:22.03-LTS-SP3
before 0.8.3-2.oe2203sp3
0.8.3-2.oe2203sp3
apache-mime4j
openEuler:22.03-LTS
before 0.8.1-3.oe2203
0.8.1-3.oe2203
apache-mime4j
openEuler:22.03-LTS-SP1
before 0.8.3-2.oe2203sp1
0.8.3-2.oe2203sp1
apache-mime4j
openEuler:22.03-LTS-SP2
before 0.8.3-2.oe2203sp2
0.8.3-2.oe2203sp2
apache-mime4j
openEuler:20.03-LTS-SP1
before 0.8.1-2.oe1
0.8.1-2.oe1
Show 11 moreShow less
Affected packages
PackageAffectedFixed
apache-mime4j
openEuler:20.03-LTS-SP4
before 0.8.1-2.oe2003sp4
0.8.1-2.oe2003sp4
org.apache.james:apache-mime4j-dom
Red Hat Lightwell:Maven
before 0.8.9.rhlw-00004, plus listed versions
0.70.7.10.7.20.8.00.8.1
Show 8 moreShow less
0.8.20.8.30.8.40.8.50.8.60.8.70.8.80.8.9
0.8.9.rhlw-00004
org.apache.james:apache-mime4j-core
Red Hat Lightwell:Maven
before 0.8.9.rhlw-00004, plus listed versions
0.70.7.10.7.20.8.00.8.1
Show 8 moreShow less
0.8.20.8.30.8.40.8.50.8.60.8.70.8.80.8.9
0.8.9.rhlw-00004
apache-mime4j
Ubuntu:16.04:LTS
All versions, plus listed versions
0.7.2-30.7.2-4
None known
apache-mime4j
Ubuntu:18.04:LTS
All versions, plus listed versions
0.7.2-4
None known
apache-mime4j
Ubuntu:20.04:LTS
All versions, plus listed versions
0.8.2-1
None known
apache-mime4j
Ubuntu:22.04:LTS
All versions, plus listed versions
0.8.2-1
None known
apache-mime4j
Ubuntu:24.04:LTS
All versions, plus listed versions
0.8.2-10.8.10-1
None known
apache-mime4j
Ubuntu:25.10
All versions, plus listed versions
0.8.12-1
None known
apache-mime4j
Ubuntu:26.10
All versions, plus listed versions
0.8.13-1
None known
apache-mime4j
Ubuntu:26.04:LTS
All versions, plus listed versions
0.8.12-10.8.13-1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-21742 is a medium vulnerability (CVSS 5.3) in Apache James Mime4j, published February 27, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.09%, the 65th percentile. Fixed in org.apache.james:apache-mime4j-core 0.8.10.

References

Show 11 moreShow less
MoveEnter Open