Race Conditions

Revision as of 19:15, 17 February 2009 by KirstenS (Talk | contribs)

Jump to: navigation, search
This article is a stub. You can help OWASP by expanding it or discussing it on its Talk page.

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.

ASDR Table of Contents

Last revision (mm/dd/yy): 02/17/2009


A race condition occurs when a pair of routine programming calls in an application do not perform in the sequential manner that was intended per business rules. It is a timing event within software that can become a security vulnerability if the calls are not performed in the correct order.

Race condition in checking for certificate revocation

If the revocation status of a certificate is not checked before each privilege requiring action, the system may be subject to a race condition, in which their certificate may be used before it is checked for revocation.


  • Authentication: Trust may be assigned to an entity who is not who it claims to be.
  • Integrity: Data from an untrusted (and possibly malicious) source may be integrated.
  • Confidentiality: Date may be disclosed to an entity impersonating a trusted entity, resulting in information disclosure.

Exposure period

  • Design: Checks for certificate revocation should be included in the design of a system
  • Design: One can choose to use a language which abstracts out this part of the authentication process.


  • Languages: Languages which do not abstract out this part of the process.
  • Operating platforms: All

Required resources

Minor trust: Users must attempt to interact with the malicious system.



Likelihood of exploit


If a certificate is revoked after the initial check, all subsequent actions taken with the owner of the revoked certificate will loose all benefits guaranteed by the certificate. In fact, it is almost certain that the use of a revoked certificate indicates malicious activity.

If the certificate is checked before each access of a protected resource, the delay subject to a possible race condition becomes almost negligible and significantly reduces the risk associated with this issue.

In C/C++:

if (!(cert = SSL_get_peer(certificate(ssl)) || !host)
  if (X509_V_OK==foo)
//do stuff
 //do more stuff without the check. 

Design: Ensure that certificates are checked for revoked status before each use of a protected resource

Risk Factors

  • A common business impact of a race condition is one where a payment confirmation occurs without producing a request object for order fulfillment.
  • The technical impact of this vulnerability can be mitigated through thread management classes or other programming constructs that control the synchronization of threads



Related Attacks

Related Vulnerabilities

Related Controls

Related Technical Impacts