Skip to content

Critical apps.pay bug (infinite coins hack)

High
celestora published GHSA-jgvp-5cc7-qjjj Nov 14, 2022

Package

composer openvk/openvk (Composer)

Affected versions

< d767d8e2eb101bce36f2ad011c6ecea18c5a8db3

Patched versions

3c632f3910eab917a9450efd9fa0e83e02c25c7c

Description

Impact

All affected OpenVK versions had a bug that gave users ability to create payment requests for negative amounts. By calling Apps.pay service api method, one could top up his balance without using vouchers or anything like that, regardless if commerce is enabled or not.

Patches

Problem has been introduced in commit d767d8e and was successfully resolved in 3c632f3. Technical Preview releases don't have this vulnerability, but it is present in nightly builds based on aftermentioned commits.

Workarounds

There are no ways to work around this issue without disabling Service API completely by blocking all requests to URL /rpc via web-server. Please note, that this will also break polls, messages, notifications and possibly other functionality.
You can also apply patch to ServiceAPI/Apps.php file only or set up filter on your proxy to deny all requests with substring "Apps.pay" in them.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

CVE ID

No known CVE

Weaknesses