Vulnerabilities in pkg:npm/tomato
PACKAGECVE-2013-7379 is a CRITICAL api admin auth weakness vulnerability (CWE-287: Improper Authentication) affecting Tomato libraries in the npm ecosystem. The issue involves api admin auth weakness in tomato. Remediation is available by upgrading affected packages to version 0.0.6.
pkg:npm/tomato
Vulnerability advisories affecting package pkg:npm/tomato. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9vxc-g2jx-qj3p | CVE-2013-7379 | CRITICAL | API Admin Auth Weakness in tomato |
| GHSA-wqhw-frpx-5mmp | - | HIGH | Command Injection in tomato |
CVE-2013-7379 at a Glance
How to Fix CVE-2013-7379
To remediate this vulnerability, upgrade all affected Tomato dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install tomato@0.0.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tomato
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2013-7379, inspect your project dependencies using npm:
npm ls tomato
Analyze the terminal output to locate any version of Tomato in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.6), your application is affected.
Note: The npm ls tomato command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Tomato, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2013-7379 Affected Tomato Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tomato
|
npm |
< 0.0.6
|
0.0.6
|
References
Frequently Asked Questions
What is CVE-2013-7379?
Which Tomato versions are affected?
What version fixes CVE-2013-7379?
Is tomato affected?
What CWE is associated with CVE-2013-7379?
How can I check npm dependencies for CVE-2013-7379?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9vxc-g2jx-qj3p",
"modified" : "2021-09-23T21:00:28Z",
"published" : "2020-08-31T22:59:07Z",
"aliases" : [ "CVE-2013-7379" ],
"summary" : "API Admin Auth Weakness in tomato",
"details" : "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 && 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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tomato"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.0.5"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-7379"
}, {
"type" : "WEB",
"url" : "https://github.com/leizongmin/tomato/commit/9e427d524e04a905312a3294c85e939ed7d57b8c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/leizongmin/tomato"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/38"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2014/05/13/1"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2014/05/15/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:08:49Z",
"nvd_published_at" : null
}
}