Under specific conditions, PingAuthorize in Gateway mode can continue an asynchronous upstream request after its 30-second gateway timeout. If the underlying keep-alive connection is reused for another request before the original response arrives, the late response can be written to the newer exchange. This could cause a subsequent caller to receive response data intended for an earlier request. This behaviour affects all releases and primarily risks unauthorized information disclosure between separate requests.
The kind of flaw
Insertion of Sensitive Information Into Sent Data CWE-201
The code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor.
- Part of the broader weakness
- Exposure of Sensitive Information to an Unauthorized Actor (CWE-200)
- Commonly found in
- Not Language-Specific
What an attacker can do with it
- Confidentiality: Read Files or Directories; Read Memory; Read Application Data. Sensitive data may be exposed to attackers.
How software makers prevent it
- Requirements: Specify which data in the software should be regarded as sensitive. Consider which types of users should have access to which types of data.
- Implementation: Ensure that any possibly sensitive data specified in the requirements is verified with designers to ensure that it is either a calculated risk or mitigated elsewhere. Any information that is not necessary to the functionality should be removed in order to lower both the overhead and the possibility of security sensitive data being sent.
- System Configuration: Setup default error messages so that unexpected errors do not disclose sensitive information.
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
Weakness data: MITRE Common Weakness Enumeration.
The kind of flaw
Sensitive Information in Resource Not Removed Before Reuse CWE-226
The product releases a resource such as memory or a file so that it can be made available for reuse, but it does not clear or "zeroize" the information contained in the resource before the product performs a critical state transition or makes the resource available for reuse by other entities.
When resources are released, they can be made available for reuse. For example, after memory is de-allocated, an operating system may make the memory available to another process, or disk space may be reallocated when a file is deleted. Since removing information requires time and additional resources, operating systems do not usually clear the previously written information. Even when the resource is reused by the same process, this weakness can arise when new data is not as large as the old data, which leaves portions of the old data still available. Equivalent errors can occur in other situations where the length of data is variable but the associated data structure is not. If memory is not cleared after use, the information may be read by less trustworthy parties when the memory is reallocated. This weakness can apply in hardware, such as when a device or system switches between power, sleep, or debug states during normal operation, or when execution changes to different users or privilege levels.
- Part of the broader weakness
- Incomplete Cleanup (CWE-459), Improper Removal of Sensitive Information Before Storage or Transfer (CWE-212)
- Commonly found in
- Not Language-Specific
What an attacker can do with it
- Confidentiality: Read Application Data.
How software makers prevent it
- Architecture and Design, Implementation: During critical state transitions, information not needed in the next state should be removed or overwritten with fixed patterns (such as all 0's) or random data, before the transition to the next state.
- Architecture and Design, Implementation: When releasing, de-allocating, or deleting a resource, overwrite its data and relevant metadata with fixed patterns or random data. Be cautious about complex resource types whose underlying representation might be non-contiguous or change at a low level, such as how a file might be split into different chunks on a file system, even though "logical" file positions are contiguous at the application layer. Such resource types might require invocation of special modes or APIs to tell the underlying operating system to perform the necessary clearing, such as SDelete (Secure Delete) on Windows, although the appropriate functionality might not be available at the application layer.
- Implementation: Be careful using vfork() and fork() in security sensitive code. The process state will not be cleaned up and will contain traces of data from past use.
Weakness data: MITRE Common Weakness Enumeration.
The kind of flaw
Race Condition within a Thread CWE-366
If two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined.
- How often attackers use it
- Medium
- Part of the broader weakness
- Concurrent Execution using Shared Resource with Improper Synchronization (CWE-362), Improper Synchronization (CWE-662)
- Commonly found in
- C, C#, C++, Java
What an attacker can do with it
- Integrity, Other: Alter Execution Logic; Unexpected State. The main problem is that -- if a lock is overcome -- data could be altered in a bad state.
How software makers prevent it
- Architecture and Design: Use locking functionality. This is the recommended solution. Implement some form of locking mechanism around code which alters or reads persistent data in a multithreaded environment.
- Architecture and Design: Create resource-locking validation checks. If no inherent locking mechanisms exist, use flags and signals to enforce your own blocking scheme when resources are being used by other threads of execution.
Weakness data: MITRE Common Weakness Enumeration.
The kind of flaw
Exposure of Data Element to Wrong Session CWE-488
The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.
- Part of the broader weakness
- Exposure of Resource to Wrong Sphere (CWE-668)
- Commonly found in
- Not Language-Specific
What an attacker can do with it
- Confidentiality: Read Application Data. Data can "bleed" from one session to another through member variables of singleton objects, such as Servlets, and objects from a shared pool. Storing user data in Servlet member fields introduces a data access race condition.
How software makers prevent it
- Architecture and Design: Protect the application's sessions from information leakage. Make sure that a session's data is not used or visible by other sessions.
- Testing: Use a static analysis tool to scan the code for information leakage vulnerabilities (e.g. Singleton Member Field).
- Architecture and Design: In a multithreading environment, storing user data in Servlet member fields introduces a data access race condition. Do not use member fields to store information in the Servlet.
Weakness data: MITRE Common Weakness Enumeration.
The kind of flaw
Missing Release of Resource after Effective Lifetime CWE-772
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
- How often attackers use it
- High
- Part of the broader weakness
- Improper Resource Shutdown or Release (CWE-404)
What an attacker can do with it
- Availability: DoS: Resource Consumption (Other); DoS: Resource Consumption (Memory); DoS: Resource Consumption (CPU). An attacker that can influence the allocation of resources that are not properly released could deplete the available resource pool and prevent all other processes from accessing the same type of resource. Frequently-affected resources include memory, CPU, disk space, power or battery, etc.
How software makers prevent it
- Requirements: Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, languages such as Java, Ruby, and Lisp perform automatic garbage collection that releases memory for objects that have been deallocated.
- Implementation: It is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free resources in a function. If you allocate resources that you intend to free upon completion of the function, you must be sure to free the resources at all exit points for that function including error conditions.
- Operation, Architecture and Design: Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems. When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users. Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).
Weakness data: MITRE Common Weakness Enumeration.