{"id":"CVE-2013-7379","aliases":["EUVD-2020-0607","GHSA-9vxc-g2jx-qj3p"],"status":"published","title":"API Admin Auth Weakness in tomato","description":"The admin API in the tomato module before 0.0.6 for Node.js does not properly check the access key when it is set to a string, which allows remote attackers to bypass authentication via a string in the access-key header that partially matches config.master.api.access_key.","severity":{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.02464,"percentile":0.84582,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-287"],"published":"2014-05-16T15:00:00Z","modified":"2026-06-17T00:01:51Z","fixes":[{"ecosystem":"npm","package":"tomato","fixed_in":["0.0.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"tomato","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.0.5"},{"fixed":"0.0.6"}]}]},{"source":"osv","ecosystem":"npm","package":"tomato","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.6"}]}]}],"products":[{"vendor":"ucdok","product":"tomato"}],"references":[{"url":"http://www.openwall.com/lists/oss-security/2014/05/15/2","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"http://www.openwall.com/lists/oss-security/2014/05/13/1","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://nodesecurity.io/advisories/Tomato_API_Admin_Auth_Weakness","tags":["x_refsource_MISC","x_transferred","Exploit"]},{"url":"https://github.com/leizongmin/tomato/commit/9e427d524e04a905312a3294c85e939ed7d57b8c","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","web"]},{"url":"https://www.npmjs.com/advisories/38","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2013-7379","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-9vxc-g2jx-qj3p"},{"url":"https://github.com/leizongmin/tomato","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2013-7379","description":"The admin API in the tomato module before 0.0.6 for Node.js does not properly check the access key when it is set to a string, which allows remote attackers to bypass authentication via a string in the access-key header that partially matches config.master.api.access_key.","status":"published","published":"2014-05-16T15:00:00Z","modified":"2024-08-06T18:09:16.971Z","updated_at":"2026-11-02T14:34:59.222149Z"}],"euvd":[{"id":"EUVD-2020-0607","description":"The admin API in the tomato module before 0.0.6 for Node.js does not properly check the access key when it is set to a string, which allows remote attackers to bypass authentication via a string in the access-key header that partially matches config.master.api.access_key.","status":"published","published":"2014-05-16T15:00:00Z","modified":"2024-08-06T18:09:16Z","updated_at":"2026-11-03T01:56:23.098352Z"}],"ghsa":[{"id":"GHSA-9vxc-g2jx-qj3p","title":"API Admin Auth Weakness in tomato","description":"Versions of `tomato` prior to 0.0.6 are affected by a somewhat complex authentication bypass vulnerability in the admin service when only a single access key is configured on the server. The vulnerability allows an attacker to guess the password for the admin service, no matter how complex that password is, in less than 200 requests.\n\n\n## Details\nThe tomato API has an admin service that is enabled by setting up an `access_key` in the config options. This `access_key` is intended to protect the API admin from unauthorized access.\n\n\nTomato verifies the `access_key` by checking to see if the server `access_key` incorporates the user provided value at any location. This allows an attacker to provide a single character as an `access_key`, and so long as the server key contains at least one instance of that character it will be considered a valid key.\n\n## Proof of Concept\nThis is the snippet of code that does the comparison to authorize requests.\n\n```\nif (access_key \u0026\u0026 config.master.api.access_key.indexOf(access_key) !== -1) {\n```\n\nFor an access_key that is set to anything that includes the letter 'a' the following request would be authorized.\n\n```\n$ curl -X POST \"http://localhost:8081/api/exec\" -H \"Content-Type: application/json\" -d @test -H \"access-key: a\"\n{\n \"cmd\": \"ls\",\n \"path\": \".\",\n \"stdout\": \"app.js\\nconfig.js\\nlog\\nnode_modules\\nserver.js\\n\",\n \"stderr\": \"\"\n}\n```\n\n\n\n## Recommendation\n\nUpdate to version 0.0.6 or later.","status":"published","published":"2020-08-31T22:59:07Z","modified":"2023-01-09T05:04:00Z","cwes":["CWE-287"],"updated_at":"2026-11-02T14:36:07.581563Z"}],"nvd":[{"id":"CVE-2013-7379","description":"The admin API in the tomato module before 0.0.6 for Node.js does not properly check the access key when it is set to a string, which allows remote attackers to bypass authentication via a string in the access-key header that partially matches config.master.api.access_key.","status":"published","published":"2014-05-16T15:55:04.333Z","modified":"2026-06-17T00:01:51.83Z","cvss":[{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T14:02:50.049023Z"}],"osv":[{"id":"GHSA-9vxc-g2jx-qj3p","title":"API Admin Auth Weakness in tomato","description":"Versions of `tomato` prior to 0.0.6 are affected by a somewhat complex authentication bypass vulnerability in the admin service when only a single access key is configured on the server. The vulnerability allows an attacker to guess the password for the admin service, no matter how complex that password is, in less than 200 requests.\n\n\n## Details\nThe tomato API has an admin service that is enabled by setting up an `access_key` in the config options. This `access_key` is intended to protect the API admin from unauthorized access.\n\n\nTomato verifies the `access_key` by checking to see if the server `access_key` incorporates the user provided value at any location. This allows an attacker to provide a single character as an `access_key`, and so long as the server key contains at least one instance of that character it will be considered a valid key.\n\n## Proof of Concept\nThis is the snippet of code that does the comparison to authorize requests.\n\n```\nif (access_key \u0026\u0026 config.master.api.access_key.indexOf(access_key) !== -1) {\n```\n\nFor an access_key that is set to anything that includes the letter 'a' the following request would be authorized.\n\n```\n$ curl -X POST \"http://localhost:8081/api/exec\" -H \"Content-Type: application/json\" -d @test -H \"access-key: a\"\n{\n \"cmd\": \"ls\",\n \"path\": \".\",\n \"stdout\": \"app.js\\nconfig.js\\nlog\\nnode_modules\\nserver.js\\n\",\n \"stderr\": \"\"\n}\n```\n\n\n\n## Recommendation\n\nUpdate to version 0.0.6 or later.","status":"published","published":"2020-08-31T22:59:07Z","modified":"2023-11-08T03:57:29.05754Z","cwes":["CWE-287"],"updated_at":"2026-11-02T15:46:44.225359Z"}]}}
