CVE-2024-21742
NoneCVSS
—
EPSS
1.1%
Published
Feb 27, 2024
CISA due date
—
Cloudanix analysis
A problem in an email-handling library could let attackers slip extra information into messages, potentially helping them trick recipients or evade security checks.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Data Tampering
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper input validation in the MIME4J DOM composer permits injection of arbitrary headers into generated MIME messages.
Why it matters to the business
Organizations relying on email or message processing pipelines may experience header spoofing that bypasses filters, enables phishing, or alters message routing and metadata.
How an attack unfolds
An attacker supplies crafted input containing newline or colon sequences to the MIME4J DOM message composition path; the library fails to sanitize the data and emits a MIME message containing the attacker-chosen headers.
How to fix it
Upgrade the MIME4J library to a version that enforces strict header validation during DOM composition; where upgrades are not immediately feasible, wrap all untrusted input with sanitization that rejects or escapes header delimiters before passing data to MIME4J.
How to confirm the fix worked
Review application code paths that invoke MIME4J DOM builders, supply test inputs containing CRLF or colon sequences, and confirm that the emitted messages contain only the intended headers.
Typical attack path
- Locate an application or service that uses vulnerable MIME4J for DOM-based message composition
- Craft input containing header-injection sequences
- Trigger message composition with the malicious input
- Inspect the resulting MIME output for injected headers
How to detect it
Search email or message-processing logs for generated MIME headers that contain unexpected field names or values not present in normal application templates.
What your security team should do
- Inventory all direct and transitive uses of MIME4J
- Prioritize upgrade of the library to the latest patched release
- Add input-validation controls around message composition
- Add logging of generated MIME headers for anomaly detection
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.apache.james:apache-mime4j-core | 0 | 0.8.10 |
| Chainguard | elasticsearch-8 | 0 | 8.13.2-r1 |
| Chainguard | elasticsearch-8-bitnami | 0 | 8.13.2-r1 |
| Chainguard | elasticsearch-8-config | 0 | 8.13.2-r1 |
| Chainguard | elasticsearch-8-iamguarded | 0 | 8.13.2-r1 |
| Chainguard | elasticsearch-config | 0 | 8.13.2-r1 |
| Chainguard | keycloak | 0 | 24.0.0-r0 |
| Chainguard | keycloak-bitnami-compat | 0 | 24.0.0-r0 |
| Chainguard | keycloak-bitnami-fips | 0 | 24.0.0-r0 |
| Chainguard | keycloak-compat | 0 | 24.0.0-r0 |
| Chainguard | keycloak-fips | 0 | 24.0.0-r0 |
| Chainguard | keycloak-fips-bitnami-compat | 0 | 24.0.0-r0 |
| Chainguard | keycloak-fips-policy-140-2 | 0 | 24.0.0-r0 |
| Chainguard | keycloak-fips-policy-140-3 | 0 | 24.0.0-r0 |
| Chainguard | keycloak-iamguarded-compat | 0 | 24.0.0-r0 |
| Chainguard | keycloak-iamguarded-fips | 0 | 24.0.0-r0 |
| Chainguard | opensearch-2 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-alerting | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-icu | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-kuromoji | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-nori | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-phonetic | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-smartcn | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-stempel | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-analysis-ukrainian | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-anomaly-detection | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-asynchronous-search | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-cross-cluster-replication | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-crypto-kms | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-custom-codecs | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-discovery-azure-classic | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-discovery-ec2 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-discovery-gce | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-entrypoint-compat | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-geospatial | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-identity-shiro | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-index-management | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-ingest-attachment | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-job-scheduler | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-alerting | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-icu | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-kuromoji | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-nori | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-phonetic | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-smartcn | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-stempel | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-analysis-ukrainian | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-anomaly-detection | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-asynchronous-search | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-cross-cluster-replication | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-crypto-kms | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-custom-codecs | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-discovery-azure-classic | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-discovery-ec2 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-discovery-gce | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-geospatial | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-identity-shiro | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-index-management | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-ingest-attachment | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-job-scheduler | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-k-nn | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-mapper-annotated-text | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-mapper-murmur3 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-mapper-size | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-ml-commons | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-neural-search | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-notifications | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-observability | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-performance-analyzer | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-reporting | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-repository-azure | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-repository-gcs | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-repository-s3 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-security | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-security-analytics | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-sql | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-store-smb | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-telemetry-otel | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-jre-bcfips-transport-nio | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-k-nn | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-mapper-annotated-text | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-mapper-murmur3 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-mapper-size | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-ml-commons | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-neural-search | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-notifications | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-observability | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-performance-analyzer | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-reporting | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-repository-azure | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-repository-gcs | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-repository-s3 | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-security | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-security-analytics | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-sql | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-store-smb | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-telemetry-otel | 0 | 2.14.0-r0 |
| Chainguard | opensearch-2-transport-nio | 0 | 2.14.0-r0 |
| Debian:11 | apache-mime4j | 0 | No fix |
| Debian:12 | apache-mime4j | 0 | No fix |
| Debian:13 | apache-mime4j | 0 | 0.8.10-1 |
| Ubuntu:16.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:18.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:20.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:22.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:24.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:24.10 | apache-mime4j | 0 | No fix |
| Ubuntu:25.04 | apache-mime4j | 0 | No fix |
| Ubuntu:25.10 | apache-mime4j | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | apache-mime4j | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | apache-mime4j | 0 | No fix |
| Wolfi | keycloak | 0 | 24.0.0-r0 |
| Wolfi | keycloak-bitnami-compat | 0 | 24.0.0-r0 |
| Wolfi | keycloak-compat | 0 | 24.0.0-r0 |
| Wolfi | keycloak-iamguarded-compat | 0 | 24.0.0-r0 |
| Wolfi | opensearch-2 | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-alerting | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-icu | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-kuromoji | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-nori | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-phonetic | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-smartcn | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-stempel | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-analysis-ukrainian | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-anomaly-detection | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-asynchronous-search | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-cross-cluster-replication | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-crypto-kms | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-custom-codecs | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-discovery-azure-classic | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-discovery-ec2 | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-discovery-gce | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-geospatial | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-identity-shiro | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-index-management | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-ingest-attachment | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-job-scheduler | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-k-nn | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-mapper-annotated-text | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-mapper-murmur3 | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-mapper-size | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-ml-commons | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-neural-search | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-notifications | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-observability | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-performance-analyzer | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-reporting | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-repository-azure | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-repository-gcs | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-repository-s3 | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-security | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-security-analytics | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-sql | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-store-smb | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-telemetry-otel | 0 | 2.14.0-r0 |
| Wolfi | opensearch-2-transport-nio | 0 | 2.14.0-r0 |
Related vulnerabilities
- CVE-2025-54988 Critical XXE in Apache Tika (tika-parser-pdf-module) in Apache Tika 1.13 through and… Also affects elasticsearch-8
- CVE-2025-22227 In some specific scenarios with chained redirects, Reactor Netty HTTP client leaks… Also affects elasticsearch-8
- CVE-2025-48924 Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs Also affects elasticsearch-8
- CVE-2025-25193 Denial of Service attack on windows app using Netty Also affects elasticsearch-8
- CVE-2024-12539 Elasticsearch Incorrect Authorization vulnerability Also affects elasticsearch-8
- CVE-2024-47535 Netty is an asynchronous event-driven network application framework for rapid development… Also affects elasticsearch-8
- CVE-2024-7254 protobuf-java has potential Denial of Service issue Also affects elasticsearch-8
- CVE-2024-37280 A flaw was discovered in Elasticsearch, affecting document ingestion when an index… Also affects elasticsearch-8