Security Vulnerability Report
中文
CVE-2025-20797 CVSS 7.8 HIGH

CVE-2025-20797

Published: 2026-01-06 02:15:44
Last Modified: 2026-01-08 19:24:05

Description

In battery, there is a possible out of bounds write due to a missing bounds check. This could lead to local escalation of privilege if a malicious actor has already obtained the System privilege. User interaction is not needed for exploitation. Patch ID: ALPS10315812; Issue ID: MSV-5534.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:google:android:14.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:google:android:15.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:google:android:16.0:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:mediatek:mt2718:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:mediatek:mt6765:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:mediatek:mt6768:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:mediatek:mt6781:-:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:mediatek:mt6833:-:*:*:*:*:*:*:* - NOT VULNERABLE
MediaTek芯片平台(具体版本需参照官方公告)
使用受影响MediaTek芯片的Android设备
ALPS固件版本 < ALPS10315812补丁版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2025-20797 PoC - MediaTek Battery Driver Out of Bounds Write * This is a conceptual proof of concept demonstrating the vulnerability. * Actual exploitation requires system privilege and device-specific analysis. * * Note: This code is for educational and security research purposes only. * Unauthorized access to computer systems is illegal. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> // Simulated battery driver structure struct battery_driver_ctx { char buffer[256]; uint32_t size; void* next_handler; }; // Vulnerable function - missing bounds check void battery_write_vulnerable(struct battery_driver_ctx* ctx, const char* data, uint32_t len) { // VULNERABILITY: No bounds checking before write // Should check: if (ctx->size + len > sizeof(ctx->buffer)) memcpy(ctx->buffer + ctx->size, data, len); ctx->size += len; } // Safe function - with bounds checking void battery_write_safe(struct battery_driver_ctx* ctx, const char* data, uint32_t len) { // FIX: Proper bounds checking if (ctx->size + len > sizeof(ctx->buffer)) { printf("[SECURITY] Write blocked - buffer overflow prevented\n"); return; } memcpy(ctx->buffer + ctx->size, data, len); ctx->size += len; } int main(int argc, char* argv[]) { printf("CVE-2025-20797 PoC - MediaTek Battery Driver OOB Write\n"); printf("=================================================\n\n"); struct battery_driver_ctx ctx; memset(&ctx, 0, sizeof(ctx)); // Normal write operation char normal_data[] = "Battery level: 85%"; battery_write_safe(&ctx, normal_data, strlen(normal_data)); printf("[OK] Normal write succeeded. Buffer size: %u\n", ctx.size); // Attempt to trigger vulnerability (conceptual) // In real scenario, this would require kernel-level access printf("\n[!] Vulnerability requires:\n"); printf(" - System privilege access\n"); printf(" - MediaTek battery driver interaction\n"); printf(" - Device-specific exploit development\n"); printf("\n[+] Mitigation: Apply MediaTek patch ALPS10315812\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-20797", "sourceIdentifier": "[email protected]", "published": "2026-01-06T02:15:43.690", "lastModified": "2026-01-08T19:24:04.953", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In battery, there is a possible out of bounds write due to a missing bounds check. This could lead to local escalation of privilege if a malicious actor has already obtained the System privilege. User interaction is not needed for exploitation. Patch ID: ALPS10315812; Issue ID: MSV-5534."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:google:android:14.0:*:*:*:*:*:*:*", "matchCriteriaId": "2700BCC5-634D-4EC6-AB67-5B678D5F951D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:google:android:15.0:*:*:*:*:*:*:*", "matchCriteriaId": "8538774C-906D-4B03-A3E7-FA7A55E0DA9E"}, {"vulnerable": true, "criteria": "cpe:2.3:o:google:android:16.0:-:*:*:*:*:*:*", "matchCriteriaId": "02882AB1-7993-47DD-84A0-8DF4272D85ED"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt2718:-:*:*:*:*:*:*:*", "matchCriteriaId": "F5506327-7DDF-4E88-9EA8-10B8E32F848B"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6765:-:*:*:*:*:*:*:*", "matchCriteriaId": "43E779F6-F0A0-4153-9A1D-B715C3A2F80E"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6768:-:*:*:*:*:*:*:*", "matchCriteriaId": "06CD97E1-8A76-48B4-9780-9698EF5A960F"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6781:-:*:*:*:*:*:*:*", "matchCriteriaId": "C4EEE021-6B2A-47A0-AC6B-55525A40D718"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6833:-:*:*:*:*:*:*:*", "matchCriteriaId": "9814939B-F05E-4870-90C0-7C0F6BAAEB39"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6835:-:*:*:*:*:*:*:*", "matchCriteriaId": "19A63103-C708-48EC-B44D-5E465A6B79C5"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6853:-:*:*:*:*:*:*:*", "matchCriteriaId": "366F1912-756B-443E-9962-224937DD7DFB"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6855:-:*:*:*:*:*:*:*", "matchCriteriaId": "89AFEE24-7AAD-4EDB-8C3E-EDBA3240730A"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6877:-:*:*:*:*:*:*:*", "matchCriteriaId": "7CA9352F-E9BD-4656-9B7C-4AFEE2C78E58"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6879:-:*:*:*:*:*:*:*", "matchCriteriaId": "704BE5CE-AE08-4432-A8B0-4C8BD62148AD"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6893:-:*:*:*:*:*:*:*", "matchCriteriaId": "213B5C7F-D965-4312-9CDF-4F06FA77D401"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6985:-:*:*:*:*:*:*:*", "matchCriteriaId": "EA72CCD1-DEA2-48EB-8781-04CFDD41AAEE"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6989:-:*:*:*:*:*:*:*", "matchCriteriaId": "AD7DE6B2-66D9-4A3E-B15F-D56505559255"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt6991:-:*:*:*:*:*:*:*", "matchCriteriaId": "CBBB30DF-E963-4940-B742-F6801F68C3FC"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8186:-:*:*:*:*:*:*:*", "matchCriteriaId": "E4932D34-06F4-49D7-81FB-772A82E8A5B5"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8188:-:*:*:*:*:*:*:*", "matchCriteriaId": "BA3D4A45-38EE-4125-AE67-89D1C707F95A"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8196:-:*:*:*:*:*:*:*", "matchCriteriaId": "FB0C4D80-28BC-4C4D-B522-AD9EC5222A2E"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8367:-:*:*:*:*:*:*:*", "matchCriteriaId": "A28FA947-314F-465B-8ADD-F7973F02D82A"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8391:-:*:*:*:*:*:*:*", "matchCriteriaId": "43B2824E-8D18-4DD7-91E7-41578B2FCD6C"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8676:-:*:*:*:*:*:*:*", "matchCriteriaId": "EE302F6F-170E-4350-A8F4-65BE0C50CB78"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8678:-:*:*:*:*:*:*:*", "matchCriteriaId": "152A5F3D-8004-4649-BDB1-E6F0798AF1CB"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8696:-:*:*:*:*:*:*:*", "matchCriteriaId": "26573298-76BC-49FE-8D99-CF03ED01B185"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt8766:-:*:*:*:*:*:*:*", "matchCriteriaId": ... (truncated)