All posts by rocco

CWE-535 – Exposure of Information Through Shell Error Message

Read Time:19 Second

Description

A command shell error message indicates that there exists an unhandled exception in the web application code. In many cases, an attacker can leverage the conditions that cause these errors in order to gain unauthorized access to the system.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-211

 

Consequences

Confidentiality: Read Application Data

 

Potential Mitigations

CVE References

CWE-536 – Servlet Runtime Error Message Containing Sensitive Information

Read Time:33 Second

Description

A servlet error message indicates that there exists an unhandled exception in your web application code and may provide useful information to an attacker.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-211

 

Consequences

Confidentiality: Read Application Data

The error message may contain the location of the file in which the offending function is located. This may disclose the web root’s absolute path as well as give the attacker the location of application files or configuration information. It may even disclose the portion of code that failed. In many cases, an attacker can use the data to launch further attacks against the system.

 

Potential Mitigations

CVE References

CWE-537 – Java Runtime Error Message Containing Sensitive Information

Read Time:17 Second

Description

In many cases, an attacker can leverage the conditions that cause unhandled exception errors in order to gain unauthorized access to the system.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-211

 

Consequences

Confidentiality: Read Application Data

 

Potential Mitigations

Phase: Implementation

Description: 

Do not expose sensitive error information to the user.

CVE References

CWE-538 – Insertion of Sensitive Information into Externally-Accessible File or Directory

Read Time:21 Second

Description

The product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-200

 

Consequences

Confidentiality: Read Files or Directories

 

Potential Mitigations

Phase: Architecture and Design, Operation, System Configuration

Description: 

Do not expose file and directory information to the user.

CVE References

CWE-539 – Use of Persistent Cookies Containing Sensitive Information

Read Time:54 Second

Description

The web application uses persistent cookies, but the cookies contain sensitive information.

Cookies are small bits of data that are sent by the web application but stored locally in the browser. This lets the application use the cookie to pass information between pages and store variable information. The web application controls what information is stored in a cookie and how it is used. Typical types of information stored in cookies are session identifiers, personalization and customization information, and in rare cases even usernames to enable automated logins. There are two different types of cookies: session cookies and persistent cookies. Session cookies just live in the browser’s memory and are not stored anywhere, but persistent cookies are stored on the browser’s hard drive. This can cause security and privacy issues depending on the information stored in the cookie and how it is accessed.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-552

 

Consequences

Confidentiality: Read Application Data

 

Potential Mitigations

Phase: Architecture and Design

Description: 

Do not store sensitive information in persistent cookies.

CVE References

CWE-54 – Path Equivalence: ‘filedir’ (Trailing Backslash)

Read Time:46 Second

Description

A software system that accepts path input in the form of trailing backslash (‘filedir’) without appropriate validation can lead to ambiguous path resolution and allow an attacker to traverse the file system to unintended locations or access arbitrary files.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-41
CWE-162

 

Consequences

Confidentiality, Integrity: Read Files or Directories, Modify Files or Directories

 

Potential Mitigations

Phase: Implementation

Description: 

Inputs should be decoded and canonicalized to the application’s current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

CVE References

  • CVE-2004-0847
    • ASP.NET allows remote attackers to bypass authentication for .aspx files in restricted directories via a request containing a (1) “” (backslash) or (2) “%5C” (encoded backslash), aka “Path Validation Vulnerability.”

CWE-540 – Inclusion of Sensitive Information in Source Code

Read Time:35 Second

Description

Source code on a web server or repository often contains sensitive information and should generally not be accessible to users.

There are situations where it is critical to remove source code from an area or server. For example, obtaining Perl source code on a system allows an attacker to understand the logic of the script and extract extremely useful information such as code bugs or logins and passwords.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-538

 

Consequences

Confidentiality: Read Application Data

 

Potential Mitigations

Phase: Architecture and Design, System Configuration

Description: 

Recommendations include removing this script from the web server and moving it to a location not accessible from the Internet.

CVE References

CWE-541 – Inclusion of Sensitive Information in an Include File

Read Time:22 Second

Description

If an include file source is accessible, the file can contain usernames and passwords, as well as sensitive information pertaining to the application and system.

Modes of Introduction:

– Implementation

 

 

Related Weaknesses

CWE-540

 

Consequences

Confidentiality: Read Application Data

 

Potential Mitigations

Phase: Architecture and Design

Description: 

Do not store sensitive information in include files.

Phase: Architecture and Design, System Configuration

Description: 

Protect include files from being exposed.

CVE References