CVE-2018-19830
Description
The UBSexToken() function of a smart contract implementation for Business Alliance Financial Circle (BAFC), an tradable Ethereum ERC20 token, allows attackers to change the owner of the contract, because the function is public (by default) and does not check the caller's identity.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The BAFC ERC-20 token contract has a public `UBSexToken()` function that acts as an unguarded constructor, allowing anyone to become the contract owner and drain its funds.
Vulnerability
The BAFC (Business Alliance Financial Circle) ERC-20 token smart contract incorrectly declares its constructor as function UBSexToken() instead of using the solidity constructor keyword or matching the contract name. This makes UBSexToken() a public function that can be called by anyone at any time (not only during deployment). The function sets owner = msg.sender without any access control, effectively allowing any caller to overwrite the contract owner. This vulnerability affects the original BAFC token contract as described in reference [1].
Exploitation
An attacker needs only to interact with the deployed BAFC contract on Ethereum and call the UBSexToken() function. No special privileges, authentication, or prior access are required. The function is public and lacks the onlyOwner modifier, so the attacker simply sends a transaction invoking UBSexToken() to become the new owner of the contract [1].
Impact
Once an attacker gains ownership by calling UBSexToken(), they can call any protected functions that rely on the onlyOwner modifier, such as withdraw() or withdrawForeignTokens(). This enables the attacker to transfer all Ether and other ERC-20 tokens held by the contract to their own address, resulting in complete theft of contract funds and a loss of control for the legitimate owners [1].
Mitigation
No patched version has been disclosed in the available references. The underlying issue is a flawed constructor pattern; developers should use the recommended constructor keyword in Solidity (or a function that matches the contract name and is called only once during deployment). Since the contract is deployed and immutable on the blockchain, the only mitigation is for token holders to avoid or migrate away from the vulnerable BAFC contract. The CVE is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog as of the publication date [1].
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2- Business Alliance Financial Circle (BAFC)/Business Alliance Financial Circle (BAFC)description
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
1News mentions
0No linked articles in our index yet.