Malicious Script Hits Laravel Package and Thousands of GitHub Repositories

A malicious script reached a Laravel package and GitHub Actions workflows. Traces of the campaign were found in 8,926 repositories. Teams should review build history and the secrets available to their workflows.

· 4 min read · 4 comments

On November 11, version 3.14.3 of digitalelvis/neuronai-studio was published on Packagist. CodeScoring considers it malicious. As CodeScoring reports in its blog on Habr, running npm install in that version’s directory executes a script that steals tokens and keys. The same script was also injected into GitHub Actions workflows: by the evening of November 12, traces of the campaign had been found in 8,926 repositories. Teams should review their GitHub Actions history from November 10 onward and check the selected version’s status in the registry before updating the package.

How the script got into builds

NeuronAI Studio is used to build AI agents visually on Laravel. But the problem extends beyond a single dependency: the script used in this campaign, named wfx, was also injected into GitHub Actions workflows starting November 10. Even projects that do not use the package should therefore check for changes to their automated builds.

The attacker used stolen GitHub tokens to access repositories. First, they opened a pull request to change the documentation, testing whether they could make edits. Then they submitted a commit under a developer’s or bot’s identity, presenting it as build maintenance. That put the malicious workflow among changes that could look like routine project work.

In one variant, the script collected secrets and variables passed in from GitHub Actions settings. These could include cloud service keys and package publishing tokens. After the script ran, the attacker reverted the commit and deleted the run record along with its log. The repository’s current files therefore do not tell the whole story: a suspicious change may already have disappeared.

The campaign affected more than the PHP package and other projects’ build workflows. SafeDep researchers also found malicious GitHub Actions workflows in published versions of the Go modules gocurl and redock. Across these cases, the question is not just which package was installed, but what code may have run while the project was being worked on.

Package versions and signs of compromise

There is uncertainty around updating digitalelvis/neuronai-studio. OX Security called 3.14.4 a fixed version, but as of November 13, both CodeScoring and Packagist flagged it as malicious. Versions 3.14.2 and 3.14.3 carried the same flags. A version number alone therefore does not establish that an update is safe: check its status in the registry before installing it.

To investigate possible tampering, the report recommends reviewing commit history and GitHub Actions runs from November 10 onward. Clues include wfx-docs branches, commits titled ci: refresh build cache, and gaps in run numbering around suspicious changes. These are reasons to investigate further, not proof of which credentials were put at risk.

If the malicious code may have run, tokens it could access should be revoked and keys it could access should be replaced. Cloud settings need a separate review: the script attempted to change trust policies for AWS roles and add wfx-ci-* credentials in Azure. It is also worth establishing whether its JavaScript component was built on a developer’s machine or in CI.

What this means for the website team

A website owner or marketer does not need to investigate commit history themselves. But they can give the team a specific task: check dependencies, changes to GitHub Actions since November 10, and the secrets available to builds. If an external contractor handles development, it is worth asking whether the suspicious workflow ran and whether any tokens or keys had to be replaced.

Developers should not stop at the current package list. In this campaign, a build workflow could gain access to secrets, after which the suspicious commit was reverted and the run log deleted. The investigation needs to connect the change history with automation runs and the credentials the workflow could access at the time.

For known malicious packages, CodeScoring describes blocking policies: the “Dependency is dangerous” condition stops a package download in CodeScoring.OSA or a project build in CodeScoring.SCA. This helps prevent the download and use of dependencies already known to be malicious, but it does not replace a review of what happened in the repository earlier.

My view: CI deserves its own scrutiny

I think the wfx case shows why build workflows cannot be treated as a minor part of a project. If they can access tokens and keys, even a short-lived change can have consequences. I would discuss not only dependency updates with the team, but also how changes to automation are reviewed and which secrets it actually needs.

I also would not promise a project owner that one update has settled the issue: as of November 13, assessments of version 3.14.4 differed. Reconstructing the change history and checking access calmly is more useful here than relying on the absence of a suspicious commit from the current files.

Sources

Where the news comes from. The text is a retelling in the author’s own words; the facts come from the source, the opinion is the author’s.

  1. В тысячи репозиториев GitHub внедрили скрипт для кражи токенов и ключей habr.com

About the author

Daan Vermeer

full-stack developer

I build websites and internal tools for small teams. I like it when a content editor can change text without filing a development request.

All posts by the author

Leave a comment

Not published. We’ll send a link to confirm your comment.

No links or ads. Your first comment is published after review. By sending a comment you agree to the privacy notice.

  1. Since the wfx script also reached GitHub Actions workflows, does the review from November 10 onward need to include workflow file history as well as build logs? I’m wondering whether the article has a specific way to distinguish injected changes from legitimate workflow edits.

    1. Daan Vermeer Post author

      Yes—review both the workflow file history and the run logs from November 10 onward. The article doesn’t give a signature that reliably separates malicious edits from legitimate ones, so compare changes against known-good revisions and check who or what introduced them, then investigate any unexpected steps or access to secrets.

      1. One extra check I’d add is to compare the permissions and secrets available to each affected workflow, not just the changed steps. If an unexpected run had access to a token, rotating it may be prudent even when the workflow diff looks small; that part can be easy to miss when reviewing build history.

        1. @ola.kowalska in a small github actions setup i worked on, checking the diff alone missed that a job could read a repo token; now i check the workflow permissions too, even when the changed step looks harmless.