# CVE-2024-2379: QUIC certificate check bypass with wolfSSL

In curl's wolfSSL QUIC backend, a bad cipher/curve argument caused an early return with success, skipping certificate verification and enabling MITM.

- Payout: $560
- Severity: low
- Program: Internet Bug Bounty
- Found by (vendor credit): Dexter Gerig
- Found by: fullmetal5
- Disclosed: 2024-03-29
- CVE: CVE-2024-2379
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/2437050
- Library page: https://bugbountylibrary.com/r/h1%3A2437050
- Tags: area:oss domain:oss impact:internal-access kind:bounty platform:hackerone sev:low tech:curl technique:source-review vuln:auth-bypass

**Target:** curl QUIC TLS initialization (vquic-tls.c) with wolfSSL backend
**Root cause:** In curl_wssl_init_ctx, result is overwritten with 0 after ctx_setup succeeds; subsequent goto out paths (e.g., on bad curves/ciphers) return success without setting up certificate verification.
**Steps:**
1. Build wolfSSL with OPENSSL_COMPATIBLE_DEFAULTS (e.g., --enable-nginx) and build curl with wolfSSL backend.
2. Set up a QUIC server with a self-signed cert for example.com.
3. Run `./curl -v --http3-only 'https://example.com/' --resolve example.com:443:192.168.1.24 --curves blah`.
4. Observe curl connects without --insecure despite invalid cert; without --curves it fails cert verification.
**How found:** Code review of vquic-tls.c: noticed result initialized to CURLE_FAILED_INIT but overwritten with 0 after ctx_setup; traced goto out paths that skip cert verification setup.
**Exploitation:** Attacker positions as MITM; victim must use curl built with wolfSSL (OpenSSL-compatible defaults) and pass a bad --curves or --tls13-ciphers value, causing curl to accept attacker's certificate and connect.
**Insight:** Audit error-handling paths where a success return value is assigned early; check if later failure branches forget to reset it, especially in TLS initialization code.

