Summary
A code injection flaw in the /ajax web management API of the Generic OEM UZ801_v2.1 4G LTE Router allows remote attackers to execute arbitrary code through MifiService.apk.
When exposed to untrusted networks, this vulnerable endpoint can be abused to gain full control over the router without requiring local access.
Affected context
The vulnerability occurs in the web management interface of the Generic OEM UZ801_v2.1 4G LTE Router (firmware V3.4.3), specifically within the /ajax API endpoint implemented by MifiService.apk.
It is relevant in deployments where:
- The management HTTP(S) interface is reachable from untrusted networks (WAN, Wi‑Fi guest, or internal hostile clients)
- The router processes API requests without strict origin or authentication checks
- User-controlled parameters are passed into backend logic without robust validation or sanitization
OEM-branded variants reusing this firmware and MifiService.apk logic may also be affected, depending on how the API is exposed.
Exploit preconditions
- Attack surface: HTTP(S) /ajax web management API endpoint on the router
- Required access: Network reachability to the router's management interface; may be over WAN or LAN depending on configuration
- Authentication: Exploitability depends on how the /ajax endpoint enforces authentication; weak or missing controls increase risk
- Trigger point: Sending crafted HTTP requests to /ajax that inject attacker-controlled code into backend processing logic in MifiService.apk
- Why exploitation is possible: Untrusted request parameters are incorporated into code-evaluating or command-building paths without proper neutralization or context-aware sanitization, enabling arbitrary code execution (CWE-94)
Why this happens
This weakness stems from treating user-supplied data as executable content within the web management backend implemented by MifiService.apk.
The /ajax endpoint appears to pass request parameters into dynamic evaluation or command-construction logic, where input is concatenated or embedded in code-like or shell-like contexts.
Without strict input validation, context-aware encoding, or the use of safe APIs that separate data from code, attackers can craft inputs that alter the intended execution flow.
Conceptually, this maps to CWE-94: Improper Control of Generation of Code, where the system generates or executes code derived from externally supplied data without adequate safeguards.
Potential impact
- Remote execution of arbitrary code on the router's operating system
- Complete compromise of router configuration, including DNS, routing, and firewall rules
- Interception, redirection, or manipulation of user network traffic passing through the router
- Deployment of persistent malware or botnet agents on the device
- Use of the compromised router as a pivot point for attacks on internal network hosts
- Denial of service by disabling connectivity, rebooting, or corrupting system settings
General mitigation guidance
Effective mitigation focuses on preventing untrusted input from influencing executable code paths and limiting the blast radius of a compromise.
Common defensive patterns include:
- Replacing any dynamic code evaluation or shell invocation with fixed, parameterized APIs that keep data and code separate
- Applying strict server-side validation and canonicalization of all parameters accepted by the /ajax API, rejecting unexpected or malformed input
- Using allowlists for expected actions and argument values rather than attempting to filter dangerous content
- Enforcing strong authentication and authorization on all management endpoints, and disabling remote management from the WAN where possible
- Running management services with least-privilege accounts and restricting access to underlying OS interfaces
- Segmenting management traffic onto dedicated networks (e.g., separate management VLAN or SSID) to reduce exposure to untrusted clients
How teams detect issues like this
Detection can combine code-centric review with runtime monitoring of router behavior:
- Static analysis: Review MifiService.apk and associated backend code for dynamic evaluation functions, command construction using string concatenation, or reflective invocation based on request parameters.
- Code review cues: Look for handler logic in /ajax that maps directly from request fields to method names, system commands, or script fragments without explicit mapping tables or allowlists.
- Policy enforcement: Establish development policies that disallow unsafe evaluation primitives and require explicit input validation for all web API endpoints on embedded devices.
- Runtime monitoring: Use network monitoring to detect anomalous requests to /ajax (e.g., unusual characters, long payloads) and behavioral monitoring to identify unexpected command execution or outbound connections from routers.
- Automated tooling: When possible, apply SAST or mobile/firmware analysis tools to the APK and firmware images to highlight code injection patterns and high-risk APIs.

