Cloudanix VulnDB

CVE-2024-41818

High · 7.5

CVSS

7.5

EPSS

0.8%

Published

Jul 29, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A vulnerable XML parsing component can be abused with specially crafted input to slow down or knock affected services offline.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Low
Patch risk
Low

What it actually does

CVE-2024-41818 is a regular expression denial-of-service vulnerability in fast-xml-parser affecting currency-related parsing logic. A remote, unauthenticated attacker can submit specially crafted XML or XML-derived input that triggers catastrophic backtracking in a vulnerable regular expression, causing excessive CPU consumption and blocking the JavaScript event loop. Because Node.js applications commonly process requests on a limited number of event loops or worker processes, a small number of malicious requests may degrade or exhaust service availability. The vulnerability affects availability only; it does not directly provide confidentiality or integrity impact.

Why it matters to the business

Applications or services that parse untrusted XML with vulnerable versions of fast-xml-parser can be made slow or unavailable, potentially causing user-facing outages, failed API transactions, delayed integrations, and increased infrastructure load. The CVSS score is high for availability impact, but EPSS is currently low and there is no known CISA KEV listing or ransomware association, so remediation should be prioritized based on whether the parser is reachable from untrusted network input, internet-facing APIs, partner integrations, or message-processing pipelines.

How an attack unfolds

An attacker identifies an application endpoint, API, file-upload workflow, webhook, message queue consumer, or integration that accepts XML and processes it with a vulnerable fast-xml-parser version. The attacker sends XML containing a crafted value that reaches the vulnerable currency parsing regular expression. When the application parses the payload, the regular expression engine spends disproportionate time evaluating the input. In a Node.js service this can block the event loop, causing slow responses, request timeouts, worker saturation, elevated CPU, and service degradation. Repeating the request or sending several concurrent payloads can maintain the denial-of-service condition until traffic is blocked, the service is restarted, rate limits take effect, or the package is upgraded.

How to fix it

Upgrade fast-xml-parser to version 4.4.1 or later. For source builds from naturalintelligence/fast-xml-parser, ensure the code includes commit d40e29cc4bbe637d7c95060b44f7a4d275facd01 or a later fixed commit. Regenerate lockfiles after upgrading and verify that transitive dependencies do not continue to resolve to a vulnerable version. If immediate upgrade is not possible, reduce exposure by rejecting oversized XML payloads, enforcing strict request body limits, validating XML fields before parsing, disabling unnecessary currency parsing paths where feasible, applying rate limits, isolating XML parsing in worker threads or separate processes with execution timeouts, and protecting internet-facing XML endpoints with WAF/API gateway rules for anomalously large or repetitive payloads.

How to confirm the fix worked

Confirm dependency resolution shows fast-xml-parser 4.4.1 or later in package manifests and lockfiles, or verify that the deployed source includes commit d40e29cc4bbe637d7c95060b44f7a4d275facd01 or later. Run software composition analysis against application repositories, containers, and deployed artifacts to ensure no vulnerable transitive copy remains. Exercise XML parsing functionality with normal business payloads to confirm compatibility. Where safe, perform controlled negative testing with oversized or repetitive XML fields to verify request body limits, parsing timeouts, and rate limits prevent CPU saturation. Monitor application performance during validation for event-loop delay, CPU spikes, request latency, and timeout behavior.

Typical attack path

  1. Discover an application endpoint, upload feature, webhook, API, or backend consumer that accepts XML or XML-like data.
  2. Send benign XML to confirm the target parses and processes XML input.
  3. Submit a crafted XML payload containing pathological currency-like content that reaches the vulnerable parser logic.
  4. Trigger excessive regular-expression backtracking during parsing, causing high CPU usage and event-loop blocking.
  5. Repeat or parallelize the requests to keep workers saturated and cause timeouts, 5xx responses, or service unavailability.

How to detect it

Review HTTP access logs, API gateway logs, WAF logs, application logs, APM traces, message broker logs, and container or host telemetry for signs of denial-of-service activity against XML-processing paths. Look for bursts of POST/PUT requests with XML content types, unusually large XML bodies, repeated malformed XML submissions, elevated 4xx/5xx rates, upstream timeout errors, long request durations, Node.js event-loop delay, worker restarts, and CPU spikes that correlate with XML parsing endpoints or XML-consuming jobs. For asynchronous processing, inspect queue depth, failed-message counts, retry storms, and worker CPU saturation around the time of degradation. Since no public exploitation indicators or unique payload signatures are provided, detection should focus on behavioral evidence: repeated XML inputs from the same source, payloads with unusually long repetitive strings in currency-like fields, and latency or CPU anomalies beginning immediately after those inputs are processed.

What your security team should do

  • Inventory applications, APIs, workers, and services that use fast-xml-parser, especially those parsing XML from untrusted users, partners, webhooks, message queues, or uploaded files.
  • Prioritize upgrade of internet-facing or externally reachable XML parsing services to fast-xml-parser 4.4.1 or later.
  • Regenerate and redeploy lockfiles, containers, and serverless packages so the fixed dependency is actually present in runtime artifacts.
  • Add or confirm request body size limits, XML field length limits, rate limits, and parsing execution timeouts around XML-processing paths.
  • Monitor for abnormal CPU saturation, event-loop delay, request timeouts, and bursts of malformed or unusually large XML submissions.
  • If exploitation is suspected, preserve access logs, request bodies where legally and operationally permitted, APM traces, container logs, and CPU/event-loop telemetry for the affected period.
  • Because there is no known KEV listing, ransomware association, or mature public exploit indicated, treat this as an availability-hardening priority unless the vulnerable parser is exposed on a critical public service.

The record

fast-xml-parser is an open source, pure javascript xml parser. a ReDOS exists on currency.js. This vulnerability is fixed in 4.4.1.

Affected packages

Ecosystem Package Introduced Fixed
npm fast-xml-parser 0 4.4.1
npm fast-xml-parser 4.3.5 4.4.1
Chainguard kubeflow-pipelines 0 2.2.0-r9
Chainguard kubeflow-pipelines-apiserver 0 2.2.0-r9
Chainguard kubeflow-pipelines-cache-deployer 0 2.2.0-r9
Chainguard kubeflow-pipelines-cache-deployer-compat 0 2.2.0-r9
Chainguard kubeflow-pipelines-cache_server 0 2.2.0-r9
Chainguard kubeflow-pipelines-frontend 0 2.2.0-r9
Chainguard kubeflow-pipelines-metadata-envoy-config 0 2.2.0-r9
Chainguard kubeflow-pipelines-metadata-writer 0 2.2.0-r9
Chainguard kubeflow-pipelines-metadata-writer-compat 0 2.2.0-r9
Chainguard kubeflow-pipelines-persistence_agent 0 2.2.0-r9
Chainguard kubeflow-pipelines-scheduledworkflow 0 2.2.0-r9
Chainguard kubeflow-pipelines-viewer-crd-controller 0 2.2.0-r9
Chainguard renovate 0 38.18.0-r0
Wolfi kubeflow-pipelines 0 2.2.0-r9
Wolfi kubeflow-pipelines-apiserver 0 2.2.0-r9
Wolfi kubeflow-pipelines-cache-deployer 0 2.2.0-r9
Wolfi kubeflow-pipelines-cache-deployer-compat 0 2.2.0-r9
Wolfi kubeflow-pipelines-cache_server 0 2.2.0-r9
Wolfi kubeflow-pipelines-frontend 0 2.2.0-r9
Wolfi kubeflow-pipelines-metadata-envoy-config 0 2.2.0-r9
Wolfi kubeflow-pipelines-metadata-writer 0 2.2.0-r9
Wolfi kubeflow-pipelines-metadata-writer-compat 0 2.2.0-r9
Wolfi kubeflow-pipelines-persistence_agent 0 2.2.0-r9
Wolfi kubeflow-pipelines-scheduledworkflow 0 2.2.0-r9
Wolfi kubeflow-pipelines-viewer-crd-controller 0 2.2.0-r9
Wolfi renovate 0 38.18.0-r0

Related vulnerabilities