8 Common Code Quality Vulnerabilities that Application Developers Should Look Out For

Web applications are always prime targets for attackers who try to exploit vulnerabilities within the application’s code. Here are the 8 most common vulnerabilities which are a direct result of poor quality coding.

Non-compliance with specific guidelines

In the world of software and application development, guidelines and specifications exist for a reason. Whenever a new error or flaw is detected, especially in coding, developers learn from their mistakes and help establish guidelines that ensure that such errors do not occur in the future. Failure to follow such specifications is often the root cause of errors in source codes.

Leftover Debug Codes

Developers often write specific sets of codes for debugging or testing purposes. These debug codes are usually removed before an application is released. However, if overlooked, a web application may be released with the debug codes and this can be exploited by attackers to create a back door into the application.

Memory leak

A developer has to ensure that any allocated block of memory no longer in use must be freed immediately. If not freed, the app is consuming more memory than required and this can cause serious issues. If a memory leak occurs at the kernel level, it can lead to severe system stability issues.

Null Dereference

A NullPointerException can be expected to occur if an application dereferences a null pointer. Although mostly seen as a software reliability issue, null pointer dereferences can be used by attackers to create NullPointerExceptions that bypass the security codes. Once through, attackers can gain access to debugging codes that allow them to open a back door into the application.

Portability flaw

No two operating systems handle an application the same way. Indeed, even different versions of the same operating system tend to execute an application in their own unique manner. If a source code is written out with one particular OS in mind, some flaws or errors may potentially crop up when the application is imported to a different OS or a different version of the same OS.

Obsolete methods

Programming languages are always being modified with new, more reliable, coding techniques replacing their predecessors. Quite often, the updates are not just for convenience, but to plug any security flaws that the old coding method was subject to. Failure to keep up with the new methods and languages will leave a web application vulnerable to attackers.

Undefined behaviour

Sometimes, the tiniest of errors can turn out to be major security flaws. Undefined behaviour of parameters definitely falls into that category. If a control parameter does not have a specific value, it is said to be undefined. No developer intends to leave control parameters undefined, but it does sometimes happen. Catching undefined control parameters is one of the biggest reasons why security code review processes exist.

Uninitialized variable

Just like undefined parameters, the use of uninitialized variables can be a very risky proposition. Uninitialized strings can prove to be a major security threat, since they can mess up authentication processes. Many commercially available security code review tools pay special attention to the possibilities of uninitialized variables, when scanning an application’s source code.

If the code quality is flawless, any attacker will have a very difficult time trying to gain access in order to do something harmful.

About the Author

Tom RhoddingsTom Rhoddings is the author of this post and likes to write about safer ways of developing websites and applications.View all posts by Tom Rhoddings →

Leave a Reply


six × = 18

CommentLuv badge