CVE-2023-37899: @feathersjs/socketio Feathers Socket Handler Allows Abusing Vulnerability
HIGHCVE-2023-37899 is a HIGH (CVSS 7.5) feathers socket handler allows abusing vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting @feathersjs/socketio libraries in the npm ecosystem. The issue involves feathers socket handler allows abusing implicit tostring. Remediation is available by upgrading affected packages to version 4.5.18, 5.0.8.
CVE-2023-37899 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-37899
To remediate this vulnerability, upgrade all affected @feathersjs/socketio 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 @feathersjs/socketio@4.5.18
npm install @feathersjs/socketio@5.0.8
npm install @feathersjs/transport-commons@4.5.18
npm install @feathersjs/transport-commons@5.0.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @feathersjs/socketio
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-37899, inspect your project dependencies using npm:
npm ls @feathersjs/socketio
Analyze the terminal output to locate any version of @feathersjs/socketio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.18), your application is affected.
Note: The npm ls @feathersjs/socketio 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-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In @feathersjs/socketio, 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-2023-37899 Affected @feathersjs/socketio Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@feathersjs/socketio
|
npm |
< 4.5.18
|
4.5.18
|
|
@feathersjs/socketio
|
npm |
≥ 5.0.0
< 5.0.8
|
5.0.8
|
|
@feathersjs/transport-commons
|
npm |
< 4.5.18
|
4.5.18
|
|
@feathersjs/transport-commons
|
npm |
≥ 5.0.0
< 5.0.8
|
5.0.8
|
References
Frequently Asked Questions
What is CVE-2023-37899?
Which @feathersjs/socketio versions are affected?
What version fixes CVE-2023-37899?
Is @feathersjs/socketio affected?
Is @feathersjs/transport-commons affected?
What is the CVSS score of CVE-2023-37899?
What CWE is associated with CVE-2023-37899?
How can I check npm dependencies for CVE-2023-37899?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hhr9-rh25-hvf9",
"modified" : "2023-07-20T14:54:30Z",
"published" : "2023-07-20T14:54:30Z",
"aliases" : [ "CVE-2023-37899" ],
"summary" : "Feathers socket handler allows abusing implicit toString",
"details" : "### Impact\n\nFeathers socket handler did not catch invalid string conversion errors like:\n\n```ts\nconst message = `${{ toString: '' }}`\n```\n\nCausing the NodeJS process to crash when sending an unexpected Socket.io message like\n\n```ts\nsocket.emit('find', { toString: '' })\n```\n\n### Patches\n\nA fix has been released in\n\n- `v5.0.8` via #3241\n- `v4.5.18` via #3242\n\n### Workarounds\n\nSince it is in the core Socket handling code upgrading to the latest version is necessary.\n### References\n\n- [v5.0.8 Changelog](https://github.com/feathersjs/feathers/blob/dove/CHANGELOG.md#508-2023-07-19)\n- [v4.5.18 Changelog](https://github.com/feathersjs/feathers/blob/crow/CHANGELOG.md#4518-2023-07-19)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@feathersjs/socketio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.18"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.17"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@feathersjs/socketio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.0.7"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@feathersjs/transport-commons"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.18"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.17"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@feathersjs/transport-commons"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.0.7"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/security/advisories/GHSA-hhr9-rh25-hvf9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37899"
}, {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/pull/3241"
}, {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/pull/3242"
}, {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/commit/0b9a6b19b12ad05934e4c8bd9917448ed39d1ed8"
}, {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/commit/c397ab3a0cd184044ae4f73540549b30a396821c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/feathersjs/feathers"
}, {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/blob/crow/CHANGELOG.md#4518-2023-07-19"
}, {
"type" : "WEB",
"url" : "https://github.com/feathersjs/feathers/blob/dove/CHANGELOG.md#508-2023-07-19"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-754" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-20T14:54:30Z",
"nvd_published_at" : "2023-07-19T20:15:10Z"
}
}