Security: remove PolinRider payload from tailwind.config.js and restore clean CommonJS config#311
Draft
Copilot wants to merge 3 commits into
Draft
Security: remove PolinRider payload from tailwind.config.js and restore clean CommonJS config#311Copilot wants to merge 3 commits into
tailwind.config.js and restore clean CommonJS config#311Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/weDevsOfficial/wedocs-plugin/sessions/d1c7f1e5-5962-4bd2-94b7-67958dfc775b Co-authored-by: iftakharul-islam <88052038+iftakharul-islam@users.noreply.github.com>
Agent-Logs-Url: https://github.com/weDevsOfficial/wedocs-plugin/sessions/d1c7f1e5-5962-4bd2-94b7-67958dfc775b Co-authored-by: iftakharul-islam <88052038+iftakharul-islam@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove PolinRider malicious payload from tailwind.config.js
Security: remove PolinRider payload from May 7, 2026
tailwind.config.js and restore clean CommonJS config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tailwind.config.jsondevelopcontained a PolinRider-style multi-stage obfuscated payload appended after the valid config terminator, plus injectedcreateRequirelines corrupting the import block. This change restores the file to a clean CommonJS Tailwind config and removes the hidden executable payload entirely.Tailwind config remediation
tailwind.config.jswith the clean expected version.import { createRequire } from 'module'/createRequire(import.meta.url)lines.};.Supply-chain signature sweep across config surface
webpack.config.jsandpostcss.config.js) for PolinRider indicators (global['!'],_$_, hidden post-terminator payload patterns).Example of restored config shape:
Original prompt
🚨 Security: Remove PolinRider Malicious Payload from
tailwind.config.jsWhat was injected
The file
tailwind.config.json thedevelopbranch contains a PolinRider multi-stage obfuscated JavaScript supply chain attack injected after the legitimate closing};. The current file (BlobSha:5cca3ff76f4921282b61c8af90c7ca281b6bb9ee) has two injection points:import { createRequire } from 'module'; const require = createRequire(import.meta.url);was inserted in the middle of a validimport {block, deliberately corrupting the syntax and hijacking Node.jsrequire.};: A massive obfuscated payload is appended on the same line as the closing};(invisible in normal diffs due to whitespace padding). This is the PolinRider pattern:global['!']='9-3463-4';var _$_1e42=(function(l,e){ /* ... */ })("rmcej%otb%",2857687);— a multi-stage eval chain that exfiltrates credentials/secrets/env vars on every build/dev-server invocation.Fix required
Replace
tailwind.config.jsentirely with the clean version below. The file is a CommonJS config (module.exports), soimport {syntax is wrong — useconst { ... } = require(...):Steps
tailwind.config.jswith exactly the clean content above — no trailing content after the final};webpack.config.js,postcss.config.js) contain similar injections (long lines withglobal['!']or_$_patterns after a closing}/});)developnpm run buildornpm run devin this repo until after the fix is mergedThe following is the prior conversation context from the user's chat exploration (may be truncated):
User:
A malicious actor injected ~5.3 KB of multi-stage obfuscated JavaScript (PolinRider) into vite.config.mjs, appended inline after the legitimate closing });. The payload executed on every Vite invocation (npm run build, dev server, etc.) and was designed to exfiltrate credentials, secrets, and environment variables.
What was injected
// appended to the end of vite.config.mjs, on the same line as });
}); global['!']='9-3463-4';var _$_1e42=(function(l,e){ /* ... */ })("rmcej%otb%",2857687);
// → multi-stage eval chain: character-shuffle decoder → string scrambler → dynamic Function() constructor
// → hijacked global require/module to gain full Node.js system access
Change
vite.config.mjs: Stripped the entire malicious payload. File is restored to its clean 43-line state; no legitimate logic was altered.
Scope
Confirmed via full-repo search that no other source files contain the payload. package-lock.json and one PNG produced false-positive grep hits (SHA-512 hashes and binary data respectively).
fix all issue from this repos
Assistant: Let me search for the affected
vite.config.mjsfiles across all the listed repositories.Assistant: Let me directly check if
vite.config.mjsexists in each repo:Assistant: After thoroughly scanning all 6 repositories across both
wp-erpandweDevsOfficialorganizations, here is what I found:🔍 Scan Results
No
vite.config.mjsfile exists in any of the 6 repositories:vite.config.mjs?wp-erp/erp-prowebpack.config.jswp-erp/wp-erpwebpack.config.jsweDevsOfficial/wp-project-managerwebpack.config.jsweDevsOfficial/pm-prowebpack.config.jsweDevsOfficial/wedocs-pluginwebpack.config.jsweDevsOfficial/wedocs-prowebpack.config.jsAll 6 repos use Webpack (not Vite) as their build tool. There is no
vite.config.mjsin any root or immediately visible subdirectory.There are a few possibilities:
This pull request was created from Copilot chat.