# CVE-2023-0460: Remote code execution in YouTube Android Player API SDK

> A malicious app can masquerade as YouTube to inject arbitrary code into apps using the YouTube Embedded Player SDK via insecure service binding.

- **Severity:** Medium 5.1 (`CVSS:3.1/AV:A/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 1 Mar 2023
- **Updated:** 7 Mar 2025
- **Also known as:** GHSA-gwwh-wv9x-j72w

## What is CVE-2023-0460?

CVE-2023-0460 is a medium-severity code injection vulnerability in Google YouTube Android Player API SDK, published on 1 Mar 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

The YouTube Embedded 1.2 SDK binds to a service within the YouTube Main App. After binding, a remote context is created with the flags Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY. This allows the client app to remotely load code from YouTube Main App by retrieving the Main App’s ClassLoader. A potential vulnerability in the binding logic used by the client SDK where the SDK ends up calling bindService() on a malicious app rather than YT Main App. This creates a vulnerability where the SDK can load the malicious app’s ClassLoader instead, allowing the malicious app to load arbitrary code into the calling app whenever the embedded SDK is invoked.

In order to trigger this vulnerability, an attacker must masquerade the Youtube app and install it on a device, have a second app that uses the Embedded player and typically distribute both to the victim outside of the Play Store.

Weakness: CWE-470 (Use of Externally-Controlled Input to Select Classes or Code)

## Which versions are affected by CVE-2023-0460?

It affects 1 product.


Products: Google Youtube Android Player Api.

## How do I fix CVE-2023-0460?

No fix has been published for CVE-2023-0460 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-0460 being exploited?

There is no known exploitation of CVE-2023-0460 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-0460 and fix it if it is affected.

What it is: CVE-2023-0460 is a medium-severity code injection vulnerability in Google YouTube Android Player API SDK, published on 1 Mar 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-0460 in the wild and no public exploit code.

Affected product: Google YouTube Android Player API SDK. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-0460/ (Markdown: https://insights.sbomify.com/CVE-2023-0460/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-0460
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-0460
- OSV: https://osv.dev/vulnerability/CVE-2023-0460

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-0460/
Summaries are generated and may contain mistakes; the official description above is the record.
