Junglewise Threat Intelligence

CVE-2013-7379: tomato API admin authentication bypass

CVE-2013-7379 · Severity: info · CVSS 9.8 · Published 2020-08-31

Technologies: Tomato.

Executive brief

Tomato is a Node.js application framework that provides an API admin service protected by an access key. Versions before 0.0.6 have a severe authentication weakness that allows an attacker to bypass the admin protection by submitting single characters until one matches a character within the configured access key—potentially compromising the API in fewer than 200 attempts regardless of password complexity.

Technical details

The vulnerability is an authentication bypass (CWE-287) in the admin service's access key verification logic. The vulnerable code uses indexOf() to check if the user-supplied access_key appears anywhere within the server's configured master key, rather than performing an exact string comparison. This flawed logic allows an attacker to trivially enumerate the character set of the server's key and gain admin access. Attack requires network access to the API endpoint and no prior authentication; the attacker can automate the process in under 200 requests. This grants full command execution via the /api/exec endpoint. The fix is to upgrade to version 0.0.6 or later.

Affected products

  • tomato tomato <0.0.6

Timeline

  • 2020-08-31: disclosed: Advisory published
  • 2014: patched: Fix released in version 0.0.6

References