Common Security Issues with dApps
Tags: dapp, web3, hosting, blockchain
Published: 2023-03-08 11:45:49

---
title: Common Security Issues with dApps
published: true
description: First in a multi-part series dApp development & hosting
canonical_url: https://blok.host/blog/common_security_issues_with_dapps/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8jqzc2q1pcf94koak1dr.png
tags: dApp, web3, hosting, blockchain
---


##Overview

Decentralised applications (dApps) are becoming increasingly popular, promising greater transparency, security, and autonomy than traditional centralised applications. However, while decentralisation can offer many benefits, it also introduces new security challenges. In this article, we'll look closely at some common security issues with dApps and how to address them.
<br>


##Hosting on centralised systems

One of the primary benefits of decentralisation is that it removes the need for a centralised authority to manage and maintain the application. However, many dApps still rely on centralised hosting systems to store their data and application code. This decision creates a central point of failure that attackers can exploit.

One common attack vector is spear-phishing, where attackers trick users into revealing sensitive information or credentials that the attacker would then use to access the underlying files/system. Once an attacker gains access to the hosting system, they can manipulate the data or application code, compromising the security of the entire dApp.

To address this issue, dApps should consider using decentralised hosting solutions like BlokHost. By hosting data and code on a decentralised network, there is no centralised authority for attackers to target. This change makes it much more difficult for attackers to compromise the integrity of the application.
<br>


##Hosting on mutable (editable) storage

Another common security issue with dApps is that content is often stored in a mutable format, meaning it can be edited or manipulated by attackers. This attack vector is particularly problematic in centralised hosting systems, where attackers can modify the data directly.

To address this issue, dApps should consider using a storage solution that uses an immutable format, like the one offered by [BlokHost](https://blok.host). For example, all data stored on the [BlokHost](https://blok.host) network is immutable, meaning it can never be changed once written to the network. This feature ensures the integrity of the data and prevents attackers from injecting malicious code.
<br>


##Insecure RPC Endpoints

Finally, dApps often need to remember to secure their RPC endpoint, leaving it open to anyone who can access it. Unfortunately, this minor mistake can be costly because other users can use the endpoint for their transactions, freely incurring fees on your behalf!

To address this issue, dApps should ensure their RPC endpoint is secured and only accessible by authorised users. This vector can be closed by implementing authentication and access control mechanisms to restrict access to the endpoint.
<br>



##Summary

In summary, dApps offer more flexibility when it comes to hosting & deployment options but also have their unique security challenges (while still sharing the many from traditional web2 sites!), which newer developers often overlook in the web3 ecosystem.
<br>

[BlokHost](https://blok.host) offers several advantages over traditional centralised hosting, including immutable data storage, validation, and lower costs. By addressing these security issues, dApps can ensure they are secure, transparent, and trustworthy.