Use of Incorrectly-Resolved Name or Reference

Property
Languagecsharp
Severitylow
CWECWE-706: Use of Incorrectly-Resolved Name or Reference
OWASPA01:2021 - Broken Access Control
Confidence LevelMedium
Impact LevelLow
Likelihood LevelLow

Description

Binding an HttpListener to wildcard addresses (like http://*/ or http://+:) allows the application to accept requests from any network interface or hostname. This can unintentionally expose your service to untrusted networks or hosts.

Impact

An attacker could access or route traffic to your application from unexpected sources, potentially bypassing network controls, exposing sensitive endpoints, or enabling unauthorized access. This increases the risk of data leaks and broader attack surfaces.

Use of Incorrectly-Resolved Name or Reference

Property
Languagejavascript
Severitymedium
CWECWE-706: Use of Incorrectly-Resolved Name or Reference
OWASPA01:2021 - Broken Access Control
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

The code allows user input to directly control which template or HTML page is rendered with res.render(). This can let attackers specify arbitrary files to load, including those they shouldn’t have access to.

Impact

If exploited, attackers could use directory traversal to render unauthorized templates or sensitive files, potentially exposing confidential information or application internals. This can lead to information disclosure, bypassing of access controls, or further attacks against your system.

Use of Incorrectly-Resolved Name or Reference

Property
Languagepython
Severitylow
CWECWE-706: Use of Incorrectly-Resolved Name or Reference
OWASPA01:2021 - Broken Access Control
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description

Using user-controlled input as the module name in importlib.import_module() lets attackers load and execute arbitrary Python code. Avoid importing modules based on untrusted data or strictly validate allowed module names.

Impact

If exploited, an attacker could execute malicious code within your application, potentially leading to data theft, unauthorized access, or full system compromise. This could severely impact application security and expose sensitive resources.

Use of Inherently Dangerous Function

Property
Languagego
Severitylow
CWECWE-242: Use of Inherently Dangerous Function
Confidence LevelLow
Impact LevelLow
Likelihood LevelLow

Description

Using Go’s ‘unsafe’ package bypasses the language’s type safety and memory protections, making it easy to introduce bugs like buffer overflows or memory corruption. This can lead to unstable or insecure code if not handled with extreme care.

Impact

If exploited, vulnerabilities from improper use of the ‘unsafe’ package can allow attackers to execute arbitrary code, crash the application, or read and write sensitive memory. This can compromise data integrity, expose confidential information, and potentially enable full system compromise.

Use of Inherently Dangerous Function

Property
Languagerust
Severitymedium
CWECWE-242: Use of Inherently Dangerous Function
Confidence LevelHigh
Impact LevelLow
Likelihood LevelLow

Description

The code uses Rust’s ‘unsafe’ block, which allows bypassing some of the language’s safety checks. This can introduce bugs or vulnerabilities if not carefully reviewed, leading to unsafe behavior.

Impact

Improper use of ‘unsafe’ may enable attackers to exploit memory corruption, cause application crashes, or achieve unauthorized access to sensitive data. It increases the risk of serious security flaws that are hard to detect and fix.

Use of Inherently Dangerous Function (4.12)

Property
Languageocaml
Severitymedium
CWECWE-242: Use of Inherently Dangerous Function (4.12)
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

Using OCaml’s ‘unsafe_’ functions bypasses important safety checks like array bounds and type validation, which can lead to memory errors or unexpected behavior. These functions should only be used if you are certain that inputs are valid and safe.

Impact

Exploiting unsafe operations can cause crashes, data corruption, or expose sensitive information by reading or writing outside intended memory areas. Attackers could leverage these weaknesses to compromise application integrity or gain unauthorized access to data.

Use of Insufficiently Random Values

Property
Languagescala
Severitylow
CWECWE-330: Use of Insufficiently Random Values
OWASPA02:2021 - Cryptographic Failures
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description

The code uses scala.util.Random to generate random values, which are predictable and not suitable for security-sensitive operations like tokens or passwords. Instead, a cryptographically secure random number generator should be used.

Impact

If predictable random values are used in things like CSRF tokens or password resets, attackers could guess or reproduce these values, leading to account takeover, unauthorized access, or compromise of sensitive data.

Use of Insufficiently Random Values

Property
Languagejava
Severitylow
CWECWE-330: Use of Insufficiently Random Values
OWASPA02:2021 - Cryptographic Failures
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description

The code uses Math.random() or java.util.Random() for generating random values. These methods are not secure for tasks like creating passwords, tokens, or any sensitive data, as their output can be predicted.

Impact

If an attacker can predict the generated values, they may be able to guess session tokens, passwords, or other secrets, leading to unauthorized access or data breaches. This can compromise user accounts and the overall security of the application.

Use of Insufficiently Random Values

Property
Languagepython
Severitymedium
CWECWE-330: Use of Insufficiently Random Values
OWASPA02:2021 - Cryptographic Failures
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelLow

Description

Generating UUIDs using uuid.uuid1() creates identifiers based on predictable system information like the MAC address and timestamp. This makes UUIDs guessable and unsuitable for security-sensitive uses.

Impact

Attackers could predict or forge UUIDs to access or manipulate data tied to those identifiers, potentially leading to unauthorized access, data leaks, or replay attacks. This undermines the integrity and confidentiality of your application’s data.