Incorrect Calculation

Property
Languagesolidity
Severitycritical
CWECWE-682: Incorrect Calculation
OWASPA7:2021 Identification and Authentication Failures
Confidence LevelHigh
Impact LevelHigh
Likelihood LevelHigh

Description

The code updates balances for both the sender (‘from’) and recipient (’to’) without checking if they are the same address. This can allow users to manipulate their own balance during self-transfers, leading to incorrect accounting.

Impact

If exploited, an attacker could repeatedly transfer tokens to themselves to inflate their balance or bypass restrictions, resulting in financial loss, broken token invariants, and potential compromise of the entire smart contract or token ecosystem.

Incorrect Comparison

Property
Languagephp
Severitylow
CWECWE-697: Incorrect Comparison
Confidence LevelLow
Impact LevelLow
Likelihood LevelLow

Description

Comparing md5 hashes using ‘==’ instead of ‘===’ in PHP can lead to unexpected results due to type juggling. This may allow values that shouldn’t match to be considered equal, creating a security risk.

Impact

An attacker could exploit loose comparisons to bypass authentication or validation checks by crafting inputs that generate ‘magic’ hash values. This could lead to unauthorized access or compromise of sensitive data in your application.

Incorrect Default Permissions

Property
Languagejava
Severitylow
CWECWE-276: Incorrect Default Permissions
OWASPA01:2021 - Broken Access Control
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description

The code sets file permissions that allow all users to read, write, or execute files, which is more access than typically needed. This exposes sensitive files or executables to unauthorized access or modification.

Impact

Attackers or unauthorized users could read confidential data, modify configuration or program files, or execute scripts and binaries they shouldn’t have access to. This can lead to data leaks, privilege escalation, or even compromise of the entire application or system.

Incorrect Default Permissions

Property
Languagepython
Severitymedium
CWECWE-276: Incorrect Default Permissions
OWASPA01:2021 - Broken Access Control
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelLow

Description

The code sets overly permissive file permissions (e.g., allowing write or execute access for group or others), which can let unintended users read or modify sensitive files. Safer defaults like 0o644 restrict write access to the file owner only.

Impact

If exploited, unauthorized users on the system could read, change, or even execute files they shouldn’t have access to. This could lead to information leaks, data tampering, or running malicious code, potentially compromising application integrity or user data.

Incorrect Default Permissions

Property
Languageruby
Severitymedium
CWECWE-276: Incorrect Default Permissions
OWASPA01:2021 - Broken Access Control
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

The code uses user-supplied input (like query parameters or cookies) to access session data. This allows attackers to control which session keys are used, potentially exposing or manipulating sensitive session information.

Impact

If exploited, an attacker could read or overwrite session values, leading to unauthorized access, privilege escalation, or bypassing security checks like authentication and CSRF protection. This can compromise user accounts and the overall security of the application.

Incorrect Default Permissions

Property
Languageruby
Severitylow
CWECWE-276: Incorrect Default Permissions
OWASPA01:2021 - Broken Access Control
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description

Default routes are enabled in this routes file. This means any public method on a controller can be called as an action. It is very easy to accidentally expose a method you didn’t mean to. Instead, remove this line and explicitly include all routes you intend external users to follow.

Incorrect Permission Assignment for Critical Resource

Property
Languageyaml
Severitymedium
CWECWE-732: Incorrect Permission Assignment for Critical Resource
OWASPA05:2021 - Security Misconfiguration
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

The Kubernetes container definition is missing a securityContext with allowPrivilegeEscalation set to false. This means the container may allow processes to gain elevated privileges inside the pod, increasing security risk.

Impact

If exploited, an attacker could escalate privileges within the container, potentially gaining access to sensitive data or control over the host or other containers. This could lead to data breaches, lateral movement, or compromise of the entire Kubernetes cluster.

Incorrect Permission Assignment for Critical Resource

Property
Languageyaml
Severitylow
CWECWE-732: Incorrect Permission Assignment for Critical Resource
OWASPA05:2021 - Security Misconfiguration
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description

The container is configured with a writable root filesystem, which means applications inside the container can change or add files. This increases the risk of malicious code being downloaded or critical files being modified during runtime.

Impact

If exploited, attackers could write or replace files in the container, potentially installing malware, creating backdoors, or tampering with application code and data. This can lead to data breaches, unauthorized access, or the compromise of other systems connected to the container.

Incorrect Permission Assignment for Critical Resource

Property
Languageyaml
Severitymedium
CWECWE-732: Incorrect Permission Assignment for Critical Resource
OWASPA05:2021 - Security Misconfiguration
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

The container’s security settings do not explicitly disable privilege escalation, which means processes inside the container could gain more permissions than intended. This makes it easier for malicious code to exploit vulnerabilities and run with elevated rights.

Impact

If exploited, an attacker could escalate privileges inside the container, potentially gaining unauthorized access to sensitive data or taking control of the host system. This increases the risk of data breaches, service disruption, or further compromise of the Kubernetes environment.

Incorrect Permission Assignment for Critical Resource

Property
Languageyaml
Severitymedium
CWECWE-732: Incorrect Permission Assignment for Critical Resource
OWASPA05:2021 - Security Misconfiguration
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description

The container’s securityContext has ‘allowPrivilegeEscalation’ set to true, which allows processes inside the container to gain additional privileges. This setting can let attackers exploit vulnerabilities to run code with higher permissions than intended.

Impact

If exploited, an attacker could escalate privileges within the container, potentially gaining access to sensitive data, interfering with other processes, or compromising the underlying host or cluster. This increases the risk of data breaches and unauthorized control over workloads.