Skip to content

Creditcoin-cli wizard command permits float type commission

Low
atodorov published GHSA-g56p-gjfg-7h59 Mar 26, 2024

Package

creditcoin-cli

Affected versions

*

Patched versions

None

Description

Summary

Inside Polkadot/Substrate Portal validator commission input field is limited to an integer value while the creditcoin-cli command expects a float value. This misleads reporter to think that creditcoin-cli isn't validating input values correctly.

Details

While Polkadot/Substrate Portal limits validator comission input field to an integer value it actually displays the value as a float:
image

In other cases, e.g. Staking Pool commission in Creditcoin Staking Dashboard, comission input is also a float number:
image

The underlying API call is pallet_staking::Pallet::validate, where the field ValidatorPrefs::commission is represented as the Parts per Billion data type. This is a fixed point representation of a fractional (non-integer) number in the range [0, 1].

Fixed-point computation with fractional values is a well-known technique in computer science often used because it can be faster and/or use less hardware resources or retain better precision than directly using floating-point computation.

The Creditcoin blockchain team takes the stance that there is no real bug or vulnerability here and that the creditcoin-cli command is working as it was designed to.

Impact

None

Credits

Originally disclosed by dobermann-pinscher at https://huntr.com/bounties/7773da6e-7be2-484b-85a4-28441fcbef11/

Severity

Low

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
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
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:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N

CVE ID

CVE-2024-22413

Weaknesses