es5-ext
es5-ext copied to clipboard
package being detected as a virus
Note from the maintainer:
This package conditionally displays a friendly message when installed via npm.
The message appears only if the computer's locale timezone is set to one of the Russian timezones and politely advises users to seek reliable sources of truth regarding the war in Ukraine. The message is short and concise.
Note that it is not uncommon for npm packages to print some information upon installation. Hundreds of packages on npm do this: https://github.com/search?q=%22%5C%22postinstall%5C%22%22+language:json&type=code. Are they reported by any anti-virus software?
This post-install logic is not part of the package's core functionality. It does not affect how the package operates when used. If you rely on a prepackaged product that depends on this package, this logic is not included in your product.
At worst, this behavior could be considered protestware, but labeling it as dangerous to users is simply incorrect. If any anti-virus software flags this behavior, please report it to them, as this is a bug on their side that unnecessarily complicates your experience.
Original post:
We updated our version of es5-ext and faced an error when publishing to VS Code marketplace when they ran anti virus scan. Checking it offline, we found out that VirusTotal started detecting the version with the manifest as a virus, hence forcing us to stay with last version before manifest.
I don't wish to get into the politics and decision - I believe this is entirely up to the package creator and maintainer to decide as it's their software, but opening this as a FYI.
@aviramha there's no virus in this package. Please report the issue to the VS Code.
Added later:
I'll be happy to report this issue to any anti-virus or security service, yet I need precise instructions from you on where I can do it?
I'm not aware of any reports on my own (my work and my personal digital life are not affected by it).
Please post instructions as comments in this thread. Thank you!
I know there's no virus. It's also not VS Code probably as more than 1 anti viruses detect it s a virus. I'd assume contacting each anti virus but I'm really pessimistic about Kaspersky not tagging this as a virus.
We emailed the marketplace team BTW, but given past experience, as written before I wouldn't hold my breath.
@aviramha thanks for emailing them.
AFAIK it's Kaspersky (Russian anti-virus) that does this kind of thing, but it's also discouraged to rely on this antivirus now (many sources warn against using it). So I guess VS Code might have fallen in to trap of relying on it (or on the antivirus that uses its database).
They really should fix it.
The problem is that this package is doing more than it advertises. It not only extends es5 with extra methods and shims, it also implements a "Call for peace" message. I think it's an unacceptable practice that slows done installation process.
https://github.com/medikoo/es5-ext/blob/main/_postinstall.js
I discovered it as yarn
started printing that es5-ext
is "building" while in fact it's processing the anti-war script.
Send more weapons to Ukraine and beat the Ruskis but do not pollute my dev environment. And I am saying this with a complete recognition that Russia is the warmonger.
So the real reason this is a virus is that it's doing needless postinstall actions that depend on the location of the user. What next? If somebody is in Russia, maybe delete all of their files? How much more evil do Ruskis need to do for this to become OK?
@Rush this package will never do more, than showing a simple message (manifest) if some installs it in Russia. Reasoning for that was elaborated extensively at #116, so let's not dive into unconstructive discussions here, this is not in the scope of this issue.
Kaspersky Anti-Virus also detects the package as a virus:
Event: Object deleted
Program name: node.exe
Program path: C:\Users\Helldar\AppData\Local\nvs\node\16.16.0\x64
Component: File Anti-Virus
Result Description: Removed
Type: Program that can harm
Name: Hoax.JS.ExtMsg.a
Accuracy: Precise
Threat Level: Medium
Object type: File
Object name: _postinstall.js
Object Path: D:\domains\volunteers\web\node_modules\es5-ext
MD5: CF2BB0D501167A2D3A0764227C3D7E16
Original:
Событие: Объект удален
Имя программы: node.exe
Путь к программе: C:\Users\Helldar\AppData\Local\nvs\node\16.16.0\x64
Компонент: Файловый Антивирус
Описание результата: Удалено
Тип: Программа, которая может нанести вред
Название: Hoax.JS.ExtMsg.a
Точность: Точно
Степень угрозы: Средняя
Тип объекта: Файл
Имя объекта: _postinstall.js
Путь к объекту: D:\domains\volunteers\web\node_modules\es5-ext
MD5: CF2BB0D501167A2D3A0764227C3D7E16
I think it's because of this text: https://github.com/medikoo/es5-ext/blob/main/_postinstall.js#L31-L72
Released in 0.10.54: https://github.com/medikoo/es5-ext/commit/28de285ed433b45113f01e4ce7c74e9a356b2af2
@andrey-helldar yes, Kaspersky is Russian-based and no longer a credible anti-virus resource.
There's widespread advice to not rely on it anymore (e.g. https://www.komando.com/security-privacy/kaspersky-antivirus-dangers/830542/).
So if you're affected by the fact that Kaspersky reports this package, ensure to not rely on Kaspersky in the first place.
Note that I will delete any off-topic responses.
The topic here is that some anti-virus software (such as Kaspersky) are reporting as if the package is containing a "virus" which is not the case. This package, in certain scenarios, just prints a short message on installation.
Respond only if you have information on other anti-virus software that reports it, or have success stories on removing dependency on that specific anti-virus software.
I would like to add on my own: there are two ways to solve the problem:
First way: to do this, go to the "Exceptions" section in the settings and add four entries:
- Directory:
<path_to_node.exe>
(for me is%USERPROFILE%\AppData\Local\nvs\
) (dir, not file) + ObjectHoax.JS.ExtMsg.a
- Directory:
%USERPROFILE%\AppData\Roaming\npm-cache\
+ ObjectHoax.JS.ExtMsg.a
- Directory:
%USERPROFILE%\AppData\Local\node-gyp\
+ ObjectHoax.JS.ExtMsg.a
- Directory of your sites. For me is
D:\domains\
+ ObjectHoax.JS.ExtMsg.a
In all points, I selected "Scan area" - "everything" (*
).
After that, the antivirus stopped responding to this error.
Second way: delete Kaspersky from PC.
PS: This file does not contain any virus, and the antivirus reacts because it belongs to a Russian company. In Russia, any anti-war statements are punishable by law. In addition, it has long been known that Kaspersky Anti-Virus works for the government.
Respond only if you have information on other anti-virus software that reports it, or have success stories on removing dependency on that specific anti-virus software.
I don't have any more information, just wanted to point out that all of the accounts that are downvoting you are very suspicious. Most don't even have more than 3 contributions. This is crazy.
Just want to point out that I've had recently McAfee report the _postinstall.js file as JS/Hoax.gen.a from my internal company monitoring system
As seen on those 2 virustotal reports :
https://www.virustotal.com/gui/file/5dd190b1792cb7ac5623c74fb28f34e3753b3a66b2fc28dc11c2e60bf3227979 https://www.virustotal.com/gui/file/a4d97b74a47ac8a9364330e304949af6193537794f83005fc6e0776d0a577a77
I just went off a call with head of security asking me questions on what es5-ext actually was etc.
@Shotman, you should probably ask security to report to McAfee a false positive. "Hoax" means that this package issues a fake warning about potential viruses etc, which is meant to put you on the alert. That's not the case here.
I also ran into problem with my companies McAfee. It automatically deletes es5-ext whenever it is found on the system, making it impossible for me to work with any project that has est5-ext as a dependency.
@pgsandstrom please report it upstream, as it's a problem with McAfee not this package
This is a problem for OSX as well without any 3rd-party AV - please stop deflecting the issue because it is happening across multiple environments and is breaking installs for many many people.
It is not our responsibility to fix your broken project. It is not a problem with specific AV suites.
This is a problem for OSX as well without any 3rd-party AV
Can you elaborate? Also, it's macOS now. btw. I work on macOS extensively and I don't see any reports
I don't see how naming of OSX or macOS is relevant to the discussion. We both understand what i mean, as would anyone else reading this comment thread.
The issue is presenting as a failure to copy the file from the yarn cache. The file is entirely unreadable on macOS 12.6, as it's blocked by the OS:
sudo cat /Users/XXX/Library/Caches/Yarn/v6/npm-es5-ext-0.10.60-e8060a86472842b93019c31c34865012449883f4-integrity/node_modules/es5-ext/_postinstall.js
cat: /Users/XXX/Library/Caches/Yarn/v6/npm-es5-ext-0.10.60-e8060a86472842b93019c31c34865012449883f4-integrity/node_modules/es5-ext/_postinstall.js: Operation not permitted
Or when installing with yarn:
error An unexpected error occurred: "EPERM: operation not permitted, copyfile '/Users/XXX/Library/Caches/Yarn/v6/npm-es5-ext-0.10.60-e8060a86472842b93019c31c34865012449883f4-integrity/node_modules/es5-ext/_postinstall.js' -> '/Users/XXX/Development/Box/notes/box-etherpad-lite2/node_modules/es5-ext/_postinstall.js'".
@rlyonbox this is totally unrelated issue on your system and has nothing to do with mentioned antivirus reports
It's very much the same issue. From what I can guess, _postinstall.sh
has been (maliciously) added to common virus scanlists and that has now propagated across many AV solutions - both 3rd-party and OS-native.
Correction, sorry I didn't spot it before. Corporate machine. There is a 3rd-party AV "Carbon Black Cloud" that blocked the file.
Hi guys,
I have sent plenty of private money to my friends in Ukraine and to student organisations etc. I pray for a better world.
But at the moment I am writing explanation notes to our client explaining why wiz.io is detecting malware in the yarn cache on our Jenkins server. I am literally quoting this github issue.
I'm also getting this issue where Moysle Security (macOS) is detecting the file as malware (Threat: MacOS_Script_ExtMsg
). This is embarrassing to explain to clients in corporate environments - I can't just mark it as a false flag and move on. I've reached out to Mosyle myself, but imo you as the owner of the package should be the one reaching out to AV vendors and sorting this out.
@pikelet let me know where exactly I can report it, and I'd happily do that.
I think it's because of this text: https://github.com/medikoo/es5-ext/blob/main/_postinstall.js#L31-L72
Released in 0.10.54: https://github.com/medikoo/es5-ext/commit/28de285ed433b45113f01e4ce7c74e9a356b2af2
@medikoo Firstly, I support your point. However truly, have you thought about changing the text in here ever so slightly to get around the blocking? If anything that would be cool to have a package that is smart about sticking it to the man
I mean wouldn't you think that allowing Russians to actually see your anti war message is a better tactic then it just getting removed as a dependency or locked to a lower version?
As you said, dont use Kaspersky but:
- A: not everyone can change their corporate environments at the drop of a hat.
- B: getting your message straight up removed in favor of a fork is more of a failure is it not?
- C: Its not just Kaspersky, its McAfee, Moysle and probably more others...
Honestly, update your readme with information of how to HELP you report this as a valid non-malicious package to any antivirus vendors that will listen, and get an issue template to work out why ones that aren't trustworthy are blocking and get around it.
As many have already called you out on it.
It is not our responsibility to fix your broken project
This is something you can fix, it can no longer be your responsibility you do wish by ceding the ownership to some others, otherwise you'll just get forked all over the show and the message won't be shared :/
@n8-dev Thanks for your comment:
have you thought about changing the text in here ever so slightly to get around the blocking?
Which part of the texts you think are responsible for it being "blocked"? Is it the Tor link?
Honestly, update your readme with information of how to HELP you report
I mentioned in above comment that I'd be happy to report all cases in my own capacity, but I need instructions from you
You've posted a lengthy comment, yet still, you provided zero help on that :)
Anyway I've updated my first comment here, with a call for help in providing me with the necessary instructions
Hi, I honor the cause for the action. We are living in a special time and hopefully this will not be a problem anymore soon.
For the time being, if you want a remedy to the problem, you can use the overrides
mechanism of your package manager of choice.
I have created a video to describe what you need to do: https://youtu.be/dh9UUqsJLok
A one off comment is not that hard to do, and its not that lengthy really, its just clear
I've got my own job man, I shouldn't have to do your homework for your module to help your mission.
As you can see in other references to this people are just dropping your package, that shows that you're failing right?
Again, I don't know what it is exactly being detected but if you change it you might get past. As most things is a game of cat n mouse trying to stay one step ahead.
Try taking out Tor links, I'd go for dropping region checking cause that could be flagged, try changing words, writing country names with spaces, who knows what they use.
Take a look at the message composer gives perhaps?, still gets the same point across and actively out there and isn't getting flagged everywhere 🤔
@n8-dev removing anything you mentioned is out of the question as it's a core of this manifest.
Again, I'll be happy to send reports to anti-virus vendors, but I need help from you (where it should be reported and what's the id/code of vulnerability I should report as false)