Severity
Medium
Short Description
AI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Packages
View packages with this alert.Suggestion
Given the AI system's identification of this package as a potential typosquat, please verify that you did not intend to install a different package. Be cautious, as malicious packages often use names similar to popular ones.
The "AI-detected possible typosquat" alert distinguishes AI-flagged typosquat threats from those which have undergone human review, similar to our existing AI-detected alerts for other threat types. It carries a Medium severity, whereas the Possible typosquat attack alert is flagged as Critical.
Typosquatting continues to be a serious attack vector, and we are evolving our detection capabilities to identify these threats faster and more reliably. This malicious practice occurs when attackers create packages with names that are intentionally similar to popular, legitimate packages. These packages often have slight variations in spelling, capitalization, or punctuation. The goal is to trick developers into accidentally installing the malicious package instead of the intended one, thereby compromising the security of their projects.
The concern with typosquats is that they can introduce significant security risks to your project. Once installed, a typosquatting package can execute malicious code, steal sensitive information, or create backdoors for future attacks. Because these packages are designed to closely resemble legitimate ones, they can easily go unnoticed, leading to potential widespread impact.
Verify the Package Name:
package.json
file. Ensure that it matches the intended package exactly, including the correct case.Confirm the Package Source:
Compare with Known Packages:
Check for Similar Names:
Remove Malicious Packages:
Replace with the Correct Package:
package.json
file.Here's an example of an AI-detected possible typosquat alert:
The alert details include the alternate package that is potentially being typosquatted. In cases where you receive this alert, it's a good idea to double check the package you're intending to install to ensure it is the legitimate one.
The heuristic for this alert is similar to the Possible Typosquat Attack alert. Socket fetches package with names similar to the target package, focusing on those with significantly higher download counts. It sorts these packages to prioritize the most likely typosquats, calculates the probability of each package being a typosquat, and flags packages if their probability exceeds a certain threshold.