The Most Common Security Mistakes made by Coders

The Most Common Security Mistakes made by Coders

In JavaScript development, security errors occur all the time but some are more serious and common than others. Whenever there’s a major hack, the media covers in detail which actors were behind it, why they did it, and what exactly was done. What’s less discussed, though, is how they did it, but that’s the most important part of the puzzle. Application vulnerabilities are usually how it happens, because of little programming errors that aren’t immediately obvious but allow cybercriminals to circumvent security controls or install malware on a system. Here are the most common security mistakes made by JavaScript developers that you should keep a lookout for in your work.

Mistake 1: Trusting third-party code

Programmers rarely build something from scratch all on their own. Usually, the application is developed from a mix of code created by colleagues, by third party software or services, and your own code. These portions of code are depended upon to perform critical activities like graphical interface elements, encryption, and more. The reality is, though, that these third-party components are often full of exploitable vulnerabilities that flew under the radar. Most programmers will simply trust the code without running security audits.

Mistake 2: Hard-coding backdoor accounts

Programmers have backdoor administrative accounts either put there for testing, or requested by superiors, but it’s definitely possible that this backdoor account gets found out. Many companies have backdoors that are undocumented but can give a cyber attacker remote access to a device. The danger is assuming that no one will be interested in your application or the security features it has.

Mistake 3: Unverified SQL injections

SQL injection is perhaps one of the most frequent and dangerous vulnerabilities that exist. SQL injection is linked in some way or another to every major breach that happened in the last 10 years. As per Vivian Flannery, a web developer at 1Day2Write and Next Coursework, “the problem is when the developers trust that the data inputted from an external source, but the SQL query can be manipulated by a nefarious actor to make the database to something unintended by the programmer, like sharing user logins and passwords, credit card information, and more.”

Mistake 4: Remote file inclusions

Similarly to the previous mistake, when programmers don’t check the inputs coming in they are creating a serious security vulnerability. Developers should instead assume that all inputs are malicious and design a program with that in mind. Furthermore, programmers should ensure that the code written accepts inputs provided with as few privileges required to accomplish a task. Any query or command has to use arguments that are properly quoted and don’t use special characters.

Mistake 5: Insecure data handling

Data security is one of the largest types of insecurity in programming. Handling data non-securely can happen in many different ways and should be on every programmer’s do not do list. Failing to encrypt data is a dangerous programming error which leads to data exposure.

Mistake 6: Failing to encrypt data.

Data must be encrypted while in transit and also when it’s at rest, from user names and passwords to any PII (personally identifiable information) and other data covered by appropriate regulations. It’s insufficient to have encryption in your application but you also need to make sure it’s implemented in the right way by risk managing to any brute-force attacks.

Mistake 7: Not using a secure cryptographic system

According to Bill Godbout, a tech writer at Write My X and Brit Student, “many firms don’t use the right measures to protect their data, and instead, use reversible encryptions that can be easily reverted to their usual values by experienced hackers. One-way hashed and salted passwords are much more secure. But unfortunately, it’s not enough to use strong cryptography if the application code around it is exploitable.”

Mistake 8: Ignoring layer 8

Programmers often forget about the humans that use the software, known as “layer 8”. Although security guidance is often given around hacking and cyber attacks, the linchpins of attacks often end up being honest, well-intentioned users or administrators. This is called social engineering, and it means that individuals are manipulated into trusting, or being confused, and exposing vulnerability.

Mistake 9: Review user actions

As a programmer, knowing that humans can introduce vulnerabilities, you need to be well-aware of the user prompts the interface elements and error messages. How do end-users interact with your applications? Do users have to update from default credentials or can they keep them? It’s important to look at user actions and plan around them.

Written by Joel Syder

The Most Common Security Mistakes made by Coders was originally published in codeburst on Medium, where people are continuing the conversation by highlighting and responding to this story.

Leave a Response

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: