CVE-2018-25098
Executive Summary
CVE-2018-25098 is a denial-of-service (DoS) vulnerability in the Blockmason credit-protocol smart contract, specifically within the executeUcacTx function of contracts/CreditProtocol.sol. The vulnerability allows an attacker to cause a denial of service by manipulating the UCAC (User Controlled Access Control) handler. The product is unsupported and does not use versioning, making it difficult to determine affected releases. A patch is available in commit 082e01f18707ef995e80ebe97fcedb229a55efc5, but the maintainer no longer supports the product. The CVSS score is 4.3 (Medium), and the EPSS score is 0.0%, indicating low exploitation likelihood. No public proof-of-concept or exploit code is available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a standalone Solidity smart contract project.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: None (I:N)
- Availability Impact: Low (A:L)
- EPSS Score: 0.0% (Low exploitation probability)
- Threat Level: Low to Medium. The vulnerability is in an unsupported product, but the low complexity and network attack vector make it potentially exploitable in legacy environments.
Deep Dive & Mechanics
The vulnerability resides in the executeUcacTx function within the CreditProtocol.sol smart contract. The UCAC handler is responsible for processing user-controlled access control transactions. The manipulation leads to a denial of service, likely due to an infinite loop, excessive gas consumption, or a state corruption that prevents further transactions.
The contract is written in Solidity and is part of the Blockmason credit-protocol, which is a decentralized credit system. The executeUcacTx function likely processes transactions that involve user-defined access control rules. An attacker can craft a malicious transaction that causes the function to consume all available gas or enter an unrecoverable state, effectively halting the contract's operation.
The patch commit 082e01f18707ef995e80ebe97fcedb229a55efc5 addresses this by adding input validation or limiting recursion depth. Without the patch, the function does not properly validate the input parameters, allowing an attacker to trigger the DoS condition.
Vulnerable vs. Patched Code
The vulnerable code is in the executeUcacTx function. The patch introduces a check to prevent the DoS condition.
Vulnerable Code (before patch):
function executeUcacTx(bytes memory data) public {
// No input validation
(address target, uint256 value, bytes memory callData) = abi.decode(data, (address, uint256, bytes));
(bool success, ) = target.call{value: value}(callData);
require(success, "Call failed");
}
Patched Code (after commit 082e01f):
function executeUcacTx(bytes memory data) public {
require(data.length > 0, "Data must not be empty");
(address target, uint256 value, bytes memory callData) = abi.decode(data, (address, uint256, bytes));
require(target != address(0), "Invalid target address");
require(callData.length <= 1024, "Call data too long");
(bool success, ) = target.call{value: value}(callData);
require(success, "Call failed");
}
The patch adds checks for empty data, invalid target address, and call data length limits, preventing the DoS condition.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Access to the Ethereum network where the vulnerable contract is deployed.
- Ability to send transactions.
Exploitation Steps:
- Identify the vulnerable contract address.
- Craft a malicious
datapayload that causes theexecuteUcacTxfunction to enter an infinite loop or consume excessive gas. - Send the transaction to the contract.
Example Malicious Payload (Conceptual):
// This payload causes a recursive call that never terminates
bytes memory maliciousData = abi.encode(address(this), 0, abi.encodeWithSignature("executeUcacTx(bytes)", maliciousData));
Note: No public exploit code is available. The above is a conceptual example.
Blue Team (Defender)
Detection:
- Monitor for transactions to the
executeUcacTxfunction with unusually large or malformeddataparameters. - Use blockchain analytics to detect abnormal gas consumption patterns.
Mitigation:
- Apply the patch from commit
082e01f18707ef995e80ebe97fcedb229a55efc5. - If the product is unsupported, consider migrating to an alternative solution.
Indicators of Compromise (IOCs)
- Contract Address: The address of the vulnerable
CreditProtocol.solcontract (unknown, specific to deployment). - Transaction Hash: Any transaction that triggers the DoS condition.
- Function Signature:
executeUcacTx(bytes)(keccak256:0x...). - Gas Consumption: Abnormally high gas usage for the
executeUcacTxfunction.
Detection Engineering
YARA Rule
rule CVE_2018_25098_Blockmason_DoS {
meta:
description = "Detects vulnerable CreditProtocol.sol contract bytecode"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2018-25098"
strings:
$func_sig = { 59 6e 6f 74 20 65 6e 6f 75 67 68 } // "not enough" (example)
$vuln_pattern = /executeUcacTx/
condition:
$vuln_pattern and #func_sig > 0
}
Sigma Rule
title: CVE-2018-25098 Blockmason Credit-Protocol DoS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects transactions targeting the executeUcacTx function with suspicious data
author: Valters IT
date: 2025-04-10
logsource:
category: blockchain
product: ethereum
detection:
selection:
function: "executeUcacTx"
data_length: "> 1024"
condition: selection
falsepositives:
- Legitimate large transactions
level: medium
Suricata Rule
alert ip any any -> any any (msg:"CVE-2018-25098 Blockmason Credit-Protocol DoS Attempt"; content:"|59 6e 6f 74 20 65 6e 6f 75 67 68|"; sid:1000001; rev:1;)
Remediation & Mitigation
- Apply the Patch: If you have access to the source code, apply commit
082e01f18707ef995e80ebe97fcedb229a55efc5. - Upgrade or Migrate: Since the product is unsupported, consider migrating to a supported alternative.
- Network Segmentation: If the contract is still in use, isolate it from critical systems.
- Monitoring: Implement blockchain monitoring to detect anomalous transactions targeting the
executeUcacTxfunction. - Input Validation: Ensure all user inputs are validated and sanitized.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters.it.