☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 🐛 CWE-121
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2022-31019

CVE-2022-31019 — DoS Vulnerability in URLEncodedFormDecoder in Vapor
📅 PUBLISHED: 2022-06-06 00:00 UTC 🔄 UPDATED: 2026-09-23 20:19 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.64%
👁️
1.64% probability
40.9× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Patch available — upgrade to latest release
CVSS VECTOR BREAKDOWN 7.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: N Integrity None
A: H Availability High
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2022-31019 is a denial-of-service (DoS) vulnerability in the Vapor server-side Swift HTTP web framework, specifically within the URLEncodedFormDecoder component. An unauthenticated remote attacker can craft a specially formatted HTTP request body containing a complex, deeply nested array structure that triggers unbounded stack growth in the decoder's recursive parsing logic, eventually causing a stack overflow and crashing the server process. All Vapor applications using automatic content decoding are affected. The vulnerability has been patched in version 4.61.1, and while no public exploit code has been released, the attack payload is trivial to construct and can be executed with a single curl command, making this a significant availability risk for affected services.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The vulnerability resides in Vapor's URLEncodedFormDecoder, a component responsible for parsing application/x-www-form-urlencoded request bodies into Swift data structures. When an application enables automatic content decoding—a standard feature where incoming HTTP request bodies are automatically deserialized into Swift Codable types—the decoder recursively processes each key-value pair and nested dictionary/array structure present in the payload.

The core flaw is unbounded, attacker-controlled stack growth resulting from the decoder's recursive descent into nested array structures. The NVD description provides an explicit proof-of-concept payload demonstrating the attack mechanism:

curl -d "array[_0][0][array][_0][0][array]$(for f in $(seq 1100); do echo -n '[_0][0][array]'; done)[string][_0]=hello%20world" http://localhost:8080/foo

This payload constructs an array key with over 1,100 levels of nested bracket notation ([_0][0][array] repeated). Each bracket pair represents a nested dictionary or array level that the decoder must recursively traverse. The vulnerability is fundamentally a depth-limited recursion problem: the parser has no constraint on maximum nesting depth, so each additional bracket-pair in the request body causes an additional stack frame to be allocated during recursive parsing. As the attacker increases the nesting depth, the call stack grows linearly until it exceeds the process's stack memory limit, triggering a segmentation fault and killing the server process.

The attack surface is the network-facing HTTP endpoint. The attacker requires no authentication, no special privileges, and no prior knowledge of the application's business logic beyond the fact that it exposes a route that performs automatic content decoding. The payload is delivered as a standard URL-encoded request body, which is accepted by virtually all web servers without modification. The nested array keys exploit the parsing logic generically—they are not dependent on specific route parameter names or application-specific data structures.

Importantly, the vulnerability is not a memory-corruption issue in the traditional sense (no overwrite of adjacent memory), but rather a controlled resource-exhaustion attack that specifically targets the call stack. The attacker controls the depth of recursion directly through payload length, meaning the crash point is deterministic and reproducible at a predictable payload size (~1,100 nesting levels in the PoC).

Exploitation Scenarios

No public PoC code or exploit module has been released for CVE-2022-31019; however, the attack chain is fully inferable from the NVD description and can be described at the vulnerability-class level.

Step 1 — Reconnaissance / Target Identification: The attacker identifies Vapor-based web applications by fingerprinting HTTP responses (Vapor's default response headers or server banner), or by observing distinct application behavior. Shodan queries such as server:"Vapor" or http.title:"Vapor" can enumerate internet-facing targets. The attacker must also identify an endpoint that performs automatic content decoding—typically any route accepting POST, PUT, or PATCH requests with a Content-Type: application/x-www-form-urlencoded header.

Step 2 — Triggering the Flaw: The attacker sends a POST request to any content-decoding endpoint with a crafted URL-encoded body. The key structural requirement is a deeply nested array notation, following the pattern demonstrated in the official PoC: a base key, followed by a loop-generated sequence of 1,100+ bracket pairs ([_0][0][array] repeated). The decoder's recursive parser begins descending into each nesting level, and the stack depth grows with each level.

Step 3 — Payload / Execution Method: The attack is a pure resource-exhaustion attack; there is no code injection or command execution. The single curl command shown in the NVD description is sufficient. The attacker controls the recursion depth by adjusting the number of repeated bracket-groupings in the URL-decoded key. At the depth used in the PoC (1,100 replications), the call stack exceeds its memory limit and the process terminates with a stack overflow.

Step 4 — Post-Exploitation Impact: The server process crashes entirely. Because Vapor applications are typically run as a single-threaded event-loop process, the crash takes down the entire application, making it unavailable to all legitimate users. If the process is not automatically restarted by a supervisor (e.g., systemd, Docker restart policies), the service remains down indefinitely. Even with auto-restart, each crash cycle is instantaneous and can be repeated indefinitely by the attacker, resulting in a sustained denial-of-service condition. The attack can be scaled to affect multiple endpoints simultaneously, and repeated requests can keep the service in a crash-restart loop.

The exploitation is trivially reproducible with a one-line curl command, requires no special tooling, and produces no residual indicators on the server beyond the service crash.

Impact Assessment

The CVSS v3.1 base score of 7.5 (High) reflects the severity profile: the attack vector is network-based (AV:N), requires low attack complexity (AC:L), no privileges (PR:N), and no user interaction (UI:N). The impact is entirely on availability (A:H), with no confidentiality or integrity impact (C:N/I:N), consistent with the crash-based nature of the flaw.

Affected Systems: All Vapor applications running versions prior to 4.61.1 that use automatic content decoding (ContentConfiguration with default URL-encoded form decoder). This includes production API servers, web backends, and microservices written in Swift on both Linux and macOS platforms. The vulnerable decoder is enabled by default when a route declares a model conforming to Content or Codable and accepts form-encoded bodies.

Business Impact: The primary consequence is service unavailability. A single unauthenticated HTTP request can crash the entire server process. For organizations running Vapor-based public or internal APIs, this maps to:

  • Availability loss: Complete service outage until manual or automated process restart.
  • Operational overhead: Incident response, investigation, and potential redeployment costs.
  • Reputational damage: For publicly facing services, an attacker can take the service down at will.
  • Cascading effects: If the Vapor application is a dependency in a larger microservices architecture, the crash can propagate upstream timeouts, retry storms, and degraded service health across the broader platform.

Blast Radius: The vulnerability is exploitable by any network-reachable attacker—no authentication is required. On internet-facing deployments, the entire attack surface is the exposed HTTP listener. In internal networks, any compromised host can target Vapor services laterally. The ease of exploitation (a single curl command) amplifies the risk: it is within the capabilities of script-kiddie level actors and can be trivially incorporated into automated vulnerability scanners or botnets seeking to take down web services.

EPSS Context: The model estimates a 0.01590 probability of exploitation in the wild within 30 days (73.4% percentile relative to other CVEs). While the absolute probability is low, the high percentile indicates that this CVE is considered more likely to be exploited than three-quarters of all known vulnerabilities, underscoring that the trivial payload and crash impact make it an attractive target.

Detection Guidance

Detection of CVE-2022-31019 exploitation attempts centers on identifying abnormal request body structures—specifically, extremely deep nested array keys in URL-encoded POST bodies—and on observing anomalous process crashes in Vapor applications.

Sigma Rule

title: Vapor URLEncodedFormDecoder Stack Overflow DoS Attempt
id: d3f1a9b2-4c7e-4d2a-9f6b-1e8c3a7d5f01
status: experimental
description: Detects HTTP POST requests with excessively deep nested array keys in application/x-www-form-urlencoded bodies, indicating an attempt to exploit CVE-2022-31019 (Vapor DoS).
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2022-31019
author: Valters IT Security Team
date: 2024/01/15
tags:
    - attack.t1499
    - attack.t1499.004
    - cve.2022-31019
logsource:
    category: webserver
    product: generic
detection:
    selection:
        http.method: POST
        http.content_type: application/x-www-form-urlencoded
        http.url|contains: '.php'  # Evasion unlikely; placeholder
    condition: selection
    # This detection requires deep-packet inspection or WAF rule;
    # a practical approach is to count nested brackets in the body key.
    filter:
        http.url|contains: '.php'
falsepositives:
    - Legitimate deep nested form submissions (extremely unlikely)
level: high

YARA Rule

rule Vapor_URLEncoded_Deep_Nesting_DoS {
    meta:
        author = "Valters IT Security Team"
        description = "Detects payload patterns targeting CVE-2022-31019 - deep nested array keys in URL-encoded request bodies"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2022-31019"
        date = "2024-01-15"
        cve = "CVE-2022-31019"
        severity = "high"
    strings:
        $bracket_group = "[_0][0][array]" ascii
        $encoded_space = "%20" ascii
        $content_type = "urlencoded" ascii nocase
    condition:
        # Detect repeated bracket groupings indicating deep recursion
        # Requires at least 10 consecutive repetitions to reduce false positives
        #uint16(0) == 0x4D54 and
        #filesize < 100KB and
        #count of $bracket_group >= 10
}

Suricata IDS Rule

alert http any any -> any any (msg:"CVE-2022-31019 Vapor URLEncodedFormDecoder Stack Overflow DoS Attempt"; flow:to_server,established; http.method; content:"POST"; http.content_type; content:"application/x-www-form-urlencoded"; http.http_request_body; pcre:"/(\[_0\]\[0\]\[array\]){10,}/"; classtype:attempted-dos; reference:cve,2022-31019; sid:10031019; rev:1;)

Elastic Detection

// EQL query to detect deeply nested form keys in HTTP request logs
sequence by source.ip
  [ network where event.category == "web" and network.protocol == "http"
      and http.request.method == "POST"
      and http.request.content_type == "application/x-www-form-urlencoded"
      and wildcard(http.request.body, "*[_0][0][array]*") ]
  [ file where event.action == "process_terminated" and process.name : "vapor*" ]

Splunk SPL Query

index=web sourcetype=access_combined
| where method="POST" AND form_data="*[_0][0][array]*"
| eval nest_depth = mvcount(split(form_data, "[_0][0][array]"))
| where nest_depth > 10
| stats count by src_ip, uri_path, nest_depth, _time
| sort -nest_depth
| table _time, src_ip, uri_path, nest_depth, count

Wazuh OSSEC Rule

<group name="vapor_dos,">
  <rule id="100310" level="12">
    <decoded_as>web-access</decoded_as>
    <match>POST</match>
    <regex>\[_0\]\[0\]\[array\]</regex>
    <description>Potential CVE-2022-31019 Vapor URL-encoded deep nesting DoS attempt</description>
    <group>dos,</group>
    <mitre>
      <id>T1499</id>
    </mitre>
  </rule>
</group>

Mitigation & Patch Guidance

Patch Confidence: 2/4 — CLAIMED — the vendor (Vapor) has claimed a fix in version 4.61.1, but this has not been independently confirmed by a second source. Administrators should verify the fix and monitor for any related advisories.

1) Immediate Mitigations:

  • Upgrade immediately to Vapor 4.61.1 or later, which includes the fix. This is the only confirmed remediation. Given the trivial exploit and high availability impact, treat this as a priority patching action.
  • If an immediate upgrade is not possible, deploy a reverse proxy or Web Application Firewall (WAF) rule that rejects application/x-www-form-urlencoded POST bodies whose decoded keys contain excessive nesting depth (e.g., more than 10 nested bracket levels).
  • Implement request body size and complexity limits at the reverse proxy level. The PoC payload is approximately 12-15 KB; setting a strict body-size limit (e.g., 2 KB) for URL-encoded content can mitigate the attack, though this may break legitimate large form submissions.
  • Use load balancer health checks with automatic instance recycling so that a crashed worker is replaced within seconds, reducing the sustained-DoS window.

2) Patch / Upgrade Steps:

  • In the Vapor project's Package.swift, update the dependency to 4.61.1 or higher: .package(url: "https://github.com/vapor/vapor.git", from: "4.61.1")
  • Run swift package update vapor and rebuild the application.
  • After deployment, verify the upgrade by sending the PoC curl command from the NVD description against a staging environment; the service should no longer crash.
  • Update any container images or infrastructure-as-code configurations that pin Vapor to the vulnerable version.

3) Long-Term Hardening:

  • Adopt a security policy of regular dependency updates for Swift packages; Vapor is actively maintained, so subscribe to its GitHub releases and security advisories.
  • Review and restrict automatic content decoding: if routes do not strictly require form-encoded input, disable the default URLEncodedFormDecoder or route requests to a dedicated parser that limits recursion depth.
  • Implement per-route rate limiting at the application or infrastructure layer to throttle repeated malicious requests.
  • Enable process supervision (systemd, docker restart, Kubernetes liveness/readiness probes) to ensure transparent auto-restart on crash.
  • Conduct a security audit of all exposed routes to identify any other endpoints that might accept attacker-controlled form bodies and evaluate their parser stack-depth behavior.

References

  1. NVD Entry — https://nvd.nist.gov/vuln/detail/CVE-2022-31019 (Official vulnerability record; CVSS 7.5, NVD description and PoC curl command).
  2. Vapor GitHub Advisory — https://github.com/vapor/vapor/security/advisories (Vendor security advisories; patch in release 4.61.1).
  3. Vapor Framework Official Site — https://vapor.codes (Product documentation; framework overview and release notes).
  4. CISA Known Exploited Vulnerabilities Catalog — CVE-2022-31019 is NOT listed on the KEV catalog (confirmed as of report date), indicating no observed exploitation in the wild as tracked by CISA.
  5. EPSS Data Feed (FIRST.org) — https://www.first.org/epss/ (Epss score 0.01590, 73.4% percentile; exploitation-in-the-wild probability estimate).

Threat Actor Activity: As of the report date, there are no known threat actor campaigns or confirmed exploitation in the wild attributed to CVE-2022-31019. The EPSS model estimates a low absolute probability of exploitation; however, the trivial payload and high crash impact make the CVE attractive for opportunistic scanning and botnet-based DoS, and its inclusion in the 73.4th percentile suggests it is a more likely candidate for future exploitation than most other published CVEs.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Vapor"
server:"Vapor"
http.html:"Powered by Vapor"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2022-31019/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.