/

CVE-2026-73211

Severity:

CRITICAL RISK

(9.8)

SQL Injection (CWE-89) in PeerTube ActorFollowModel

CVE-2026-73211

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access and administrator account takeover

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical SQL injection vulnerability in PeerTube allows an unauthenticated remote server to influence a database query through a crafted ActivityPub actor inbox URL. Successful exploitation may let an attacker read or modify database records, expose OAuth access tokens, and take over administrator accounts.

Affected context

The vulnerability occurs in PeerTube's ActivityPub federation workflow when ActorFollowModel.updateScore() processes an attacker-controlled actor inboxUrl. Deployments become at risk when they accept federated actor data from remote servers and interpolate that value into SQL without reliable parameterization or equivalent query protection.

Exploit preconditions

  • Attack surface: ActivityPub federation and actor-processing functionality
  • Required access: No authenticated PeerTube account is required; the attacker operates or controls a remote federated server
  • Trigger point: Processing an ActivityPub actor or follow-related update that invokes ActorFollowModel.updateScore()
  • Why exploitation is possible: The remote actor's inboxUrl is incorporated into an SQL query as attacker-controlled data, allowing query structure and database operations to be influenced

Why this happens

The underlying bug is SQL query construction that incorporates externally supplied actor data through string interpolation rather than treating it strictly as a parameter value. This breaks the separation between SQL code and data and maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). Because the affected input is accepted through federation, an unauthenticated remote system may reach the vulnerable processing path.

Potential impact

  • An attacker may read sensitive PeerTube database records
  • An attacker may modify or delete database tables and application data
  • OAuth access tokens may be exposed
  • Administrator accounts may be taken over
  • Federated content, users, or application integrity could be compromised
  • The PeerTube instance may be used for further abuse or lateral movement

General mitigation guidance

Mitigation generally focuses on eliminating SQL construction from untrusted strings and reducing the trust placed in federated metadata.

Common defensive patterns include:

  • Use parameterized queries, prepared statements, or carefully constrained ORM query interfaces
  • Apply strict type, format, and length validation to ActivityPub URLs before processing
  • Reject malformed or unexpected federation data early, before database operations
  • Run the application with a database account limited to the permissions it requires
  • Protect OAuth tokens and other secrets with appropriate encryption, access controls, and rotation procedures
  • Limit federation exposure and isolate database services from unnecessary network access

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify SQL built by concatenating or interpolating request, federation, or URL data
  • Code review checks for ORM escape hatches, raw-query APIs, and missing parameter binding
  • Tests that verify query parameters remain data rather than altering query behavior
  • Database audit logs for unusual reads, writes, schema changes, or access to token tables
  • Application logs showing abnormal federated actor activity or repeated processing failures
  • Policy enforcement requiring parameterized database access and security review for federation handlers

Sources

SourceLink
github.comgithub.com/Chocobozzz/PeerTube/commit/cc07364a5d635b6e43a92fc5e2e2e3eeacf4e8f4
github.comgithub.com/Chocobozzz/PeerTube/releases/tag/v8.1.6
github.comgithub.com/Chocobozzz/PeerTube/releases/tag/v8.1.8
github.comgithub.com/Chocobozzz/PeerTube/security/advisories/GHSA-pqr4-34h8-g39x

Frequently asked

questions

Yes. An unauthenticated remote server may reach the vulnerable code through PeerTube's ActivityPub federation functionality.

No. The key requirement is the ability to provide or cause processing of attacker-controlled federated actor metadata, particularly an inboxUrl.

Use parameterized queries or prepared statements for every database operation and validate federated input before it reaches persistence logic.

Combine secure database APIs, strict input validation, least-privilege database permissions, federation monitoring, and code review policies that prohibit dynamic SQL construction from external data.

Find out what's already
exploitable in your codebase.