CVE-2020-24807: Arbitrary code execution in socket.io-file

socket.io-file Updated 02 Oct 2025

Summary

10/05/2021
No i
High
7.8

CVE-2020-24807: "Arbitrary code execution in socket.io-file". Affects socket.io-file versions < 2.0.31. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The socket.io-file package is an npm package for Node.js that provides functionality for file uploads in applications using the Socket.IO framework. It allows users to upload files from the client-side to the server-side. The package relies on client-side validation of file types to ensure that only allowed file types are uploaded. However, a vulnerability in versions up to 2.0.31 allows remote attackers to execute arbitrary code by uploading an executable file with a modified JSON name field. It is important to note that this vulnerability only affects products that are no longer supported by the maintainer.

Vulnerability Detail

The vulnerability in socket.io-file arises from the lack of server-side validation of file types. By modifying the JSON name field, an attacker can upload an executable file, bypassing the client-side validation. This can lead to arbitrary code execution on the server, potentially compromising the entire system. The impact of this vulnerability is high, as it allows an attacker to execute arbitrary code with the privileges of the server process. The Common Weakness Enumeration (CWE) ID associated with this vulnerability is CWE-20.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, as a general best practice, it is recommended to implement multiple layers of security controls, such as input validation and sanitization, to mitigate the risk of arbitrary code execution vulnerabilities. Additionally, regularly updating software dependencies to the latest versions can help prevent known vulnerabilities.

Conclusion

The vulnerability in socket.io-file allows remote attackers to execute arbitrary code on the server by uploading an executable file with a modified JSON name field. To mitigate this vulnerability, it is crucial to upgrade to a version of socket.io-file that is not affected by this issue and implement server-side validation of file types. Regularly updating software dependencies and following best practices for secure coding can help prevent similar vulnerabilities in the future. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for socket.io-file →

Share this vulnerability

FAQ

Versions up to 2.0.31 of socket.io-file are affected by this vulnerability.

This vulnerability allows remote attackers to execute arbitrary code on the server, potentially compromising the entire system.

Yes, the maintainer of socket.io-file has addressed this vulnerability in later versions. Upgrading to the latest version will resolve the issue.

Implementing server-side validation of file types can complement the client-side validation and help prevent similar vulnerabilities. Regularly updating software dependencies to the latest versions can also mitigate the risk of known vulnerabilities.

There is no information available about any public exploits targeting this vulnerability at the moment.

Related vulnerabilities

Recent vulnerabilities recorded for socket.io-file.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback