/

CVE-2026-33509

Severity:

HIGH RISK

(7.5)

Improper Privilege Management in pyLoad Configuration API

CVE-2026-33509

Analyzed

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Remote Code Execution by Privilege Misuse

Severity:

HIGH RISK

(7.5)

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 privilege management weakness in pyLoad's set_config_value() API lets users with the non-admin SETTINGS permission modify sensitive configuration options without proper restriction.

By changing the reconnect.script option to point to an arbitrary executable on the system, a SETTINGS-level user can trigger execution via subprocess.run(), leading to remote code execution under specific conditions.

Affected context

This vulnerability affects pyLoad deployments that:

  • Run versions from 0.4.0 up to (but not including) 0.5.0b3.dev97
  • Expose the set_config_value() API endpoint to users with the SETTINGS permission
  • Use the reconnect feature that calls an external script via subprocess.run()

In these contexts, configuration values are treated as trusted even when written by non-admin users, including paths used for script execution.

Exploit preconditions

  • Attack surface: pyLoad HTTP/API interface (set_config_value() endpoint)
  • Required access: Valid pyLoad account with the SETTINGS permission (non-admin but with configuration write access)
  • Trigger point: Invocation of the reconnect logic in the thread manager, which reads reconnect.script and passes it directly to subprocess.run()
  • Why exploitation is possible: The configuration API lacks fine-grained authorization and does not restrict or validate security-critical options like reconnect.script, allowing lower-privileged users to control an executable path that is later run by the server process.

Why this happens

The root cause is an improper privilege management design where the SETTINGS permission grants broad write access to configuration fields without differentiating between benign and security-sensitive options.

Instead of enforcing fine-grained authorization and validation, set_config_value() allows nearly all keys to be modified, with only a special-case check for general.storage_folder.

This aligns with CWE-269 (Improper Privilege Management), where a user with some level of authorization can perform actions beyond their intended scope—in this case, indirectly controlling what executable subprocess.run() invokes via reconnect.script.

Potential impact

  • A SETTINGS-level user may execute arbitrary system commands or binaries under the pyLoad service account.
  • Attackers could install or run backdoors or additional malicious tools on the host.
  • Local data, including downloaded files and configuration secrets, can be accessed or exfiltrated by the attacker-controlled code.
  • The compromised pyLoad instance can be used as a pivot point for further attacks within the same host or network environment.

General mitigation guidance

Mitigation generally focuses on tightening privilege boundaries and restricting which configuration fields lower-privileged users can modify.

Useful defensive patterns include:

  • Splitting configuration into security-sensitive and non-sensitive domains, with only administrators allowed to update security-sensitive keys (such as script paths and command templates).
  • Introducing explicit allowlists for configuration keys that lower-privileged roles can modify, rather than blocking only one or two fields.
  • Treating any configuration-derived value that influences command execution or file paths as untrusted, validating and constraining it to safe directories or predefined options.
  • Running the pyLoad service with least-privilege OS accounts and minimizing the presence of unnecessary executables on the system to reduce the blast radius if script paths are abused.

How teams detect issues like this

Organizations can detect and monitor this class of issue using several approaches:

  • Static analysis and code review to identify configuration-update endpoints that:
  • Authorize based on broad roles or flags (e.g., SETTINGS) without per-field checks.
  • Allow direct control of values later passed to subprocess, shell commands, or interpreters.
  • Logging and alerting for configuration changes to sensitive keys such as reconnect.script, especially when initiated by non-admin users.
  • Policy-based configuration management that periodically inspects configuration files or database entries for unexpected script paths or executable references.
  • Automated security testing that exercises API endpoints with lower-privileged accounts to confirm proper enforcement of role-based access control for configuration updates.

Sources

SourceLink
github.comgithub.com/pyload/pyload/security/advisories/GHSA-r7mc-x6x7-cqxx

Frequently asked

questions

Yes, if the pyLoad API is exposed over the network and an attacker can obtain or create an account with the SETTINGS permission, they can exploit the issue remotely by modifying the reconnect.script configuration and triggering reconnect.

The attacker must have valid credentials for a pyLoad user role that includes the SETTINGS permission. Full administrative access is not required, but some configuration write capability is necessary.

The robust fix pattern is to implement fine-grained privilege management on configuration updates: define which roles may modify each configuration key, enforce allowlists for sensitive options (like script paths), and treat any configuration that influences code or command execution as requiring administrative-level authorization.

When designing configuration APIs, explicitly model privilege levels for each configuration field, avoid catch-all roles that can change "all settings," and require admin-only permissions for anything that affects process execution, file system access, or network behavior. Complement this with systematic code review and automated tests that verify lower-privileged roles cannot modify security-critical options.

Find out what's already
exploitable in your codebase.