GHSA-fg86-4c2r-7wxw

Suggest an improvement
Source
https://github.com/advisories/GHSA-fg86-4c2r-7wxw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/07/GHSA-fg86-4c2r-7wxw/GHSA-fg86-4c2r-7wxw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-fg86-4c2r-7wxw
Aliases
Published
2024-07-15T17:48:26Z
Modified
2024-07-15T22:23:10.015366Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
  • 9.3 (Critical) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
TorrentPier Deserialization of Untrusted Data vulnerability
Details

Summary

In torrentpier/library/includes/functions.php, get_tracks() uses the unsafe native PHP serialization format to deserialize user-controlled cookies:

https://github.com/torrentpier/torrentpier/blob/84f6c9f4a081d9ffff4c233098758280304bf50f/library/includes/functions.php#L41-L60

PoC

One can use phpggc and the chain Guzzle/FW1 to write PHP code to an arbitrary file, and execute commands on the system. For instance, the cookie bb_t will be deserialized when browsing to viewforum.php.

Database specific
{
    "nvd_published_at": "2024-07-15T20:15:04Z",
    "cwe_ids": [
        "CWE-502"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2024-07-15T17:48:26Z"
}
References

Affected packages

Packagist / torrentpier/torrentpier

Package

Name
torrentpier/torrentpier
Purl
pkg:composer/torrentpier/torrentpier

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
2.4.3

Affected versions

v2.*

v2.2.0
v2.2.1
v2.2.2
v2.2.3
v2.3.0
v2.3.0.1
v2.3.0.2
v2.3.0.3
v2.3.1-rc1
v2.3.1
v2.4.0-alpha1
v2.4.0-alpha2
v2.4.0-alpha3
v2.4.0-alpha4
v2.4.0-beta1
v2.4.0-beta2
v2.4.0-beta3
v2.4.0-beta4
v2.4.0-rc1
v2.4.0-rc2
v2.4.0
v2.4.1
v2.4.2
v2.4.3

2.*

2.3.0.4-beta
2.3.0.4-beta2