Skip to content
FIVECRATE

FiveM Backdoor: Find and Remove Malicious Code in Resources

Find a FiveM backdoor in your resources: search for remote code loaders, read what each hit does, rebuild from clean copies and rotate your keys and passwords.

Author: FiveCrate
Published:
Updated:
Read time: 19 min
Applies to
FiveM Legacy and FiveM for GTAV Enhanced (early access) servers; FXServer 35245 (Recommended from August 20, 2026) to 38435 (Recommended) and 38781 (Latest) as listed on December 2, 2026; Lua and JavaScript resources on Qbox, ESX, QBCore or standalone servers
Last verified

Direct Answer

A FiveM backdoor is code hidden in a resource that lets someone else run their own code on your server. The known ones download text from a remote address and run it with Lua’s load or JavaScript’s eval. To find one, stop the server, search every .lua and .js file for PerformHttpRequest, load(, eval(, new Function( and \x escapes, and check whether downloaded text is turned into code. Infections spread between resources, so reinstall from clean copies, rebuild the machine if server code was infected, then change your registration key, database password and txAdmin logins.

What a FiveM backdoor is and why it spreads

A backdoor gives someone control over a server they do not own. Cfx described a recurring case in its March 2022 monthly update: server assets were circulating with a backdoor that their supposed author used to “destroy” a server, corrupting its scripts and adding a message saying the server was blocked. Cfx had not blocked those servers.

Three properties make a backdoor harder to deal with than an ordinary bug:

  • It hides. In its June 2023 Community Pulse, Cfx explained why it acted against popular code obfuscators: paid anticheat resources were using them to hide exploits, some able to read, write and exfiltrate files on players’ computers. The same post restates the rule that “the use of any obfuscation method other than the Asset escrow system is prohibited, and it always has been”.
  • It spreads. Cfx’s Resource FAQ warns that one resource can “infect” others. A Cfx.re forum moderator described a 2022 case as malware “which adds itself to every resource”, to be removed from every resource or by reinstalling the server from scratch.
  • It reaches past FiveM. If such code runs as a server script, the same moderator wrote in 2020, “your whole machine can be compromised and you can’t trust the machine anymore as it could have installed anything.”

Players are exposed too. The moderator identified a helpCode event added to client files as one that “allows the caller to execute arbitrary code”.

“Resource contains prohibited logic”: what Cfx says it means

Players have reported this message on the forum since at least 2020, shown while joining a server in the form Resource <name> contains prohibited logic. Cfx’s Resource FAQ answers it directly: “The resource in question likely contains malicious code.” It adds that another resource sometimes “infects” other resources, so you should check the code of the resource it names, and that prohibited logic “usually includes code that can infect other resources, or that impacts your overall gameplay experience.”

When a player posted a screenshot of it in 2020, a Cfx.re moderator sent server owners to that FAQ and players to the server owner. Treat the named resource as the first place to look, not as the whole problem: run the full search below on every resource.

Cipher Panel and Blum Panel: how known FiveM backdoors work

Two families are described in sources you can read. Their names and addresses change, so search for what they do rather than for what they are called.

Cipher PanelBlum Panel
ReportedForum threads from 2022 on; a Cfx.re moderator linked it to the helpCode event in June 2022A community warning on the Cfx.re forum on July 21, 2026
LanguageLuaJavaScript
How it runs codePerformHttpRequest downloads text, load compiles it and the result is calledAn obfuscated loader downloads code over HTTPS about 20 seconds after start and runs it with eval(), with 3 fallback URLs
How it hidesHex codes: its address as a list of hex pairs, its file paths as \x escapesXOR and character-code obfuscation
What else it doesWrites itself into the sessionmanager resourceThe downloaded second stage steals saved browser logins, Discord tokens and files, according to the warning

A community reverse-engineering write-up linked from the Cfx.re forum calls Cipher Panel “malicious software for hire targeting FiveM servers”: buyers generate a payload and add it to FiveM scripts. The payload encodes its strings so that people cannot simply open the script to see what it does. Its infection stage waits 20000 milliseconds (Citizen.Wait(20000)). Unless a marker file already exists, it then:

  • appends a loader to server/host_lock.lua in sessionmanager;
  • adds a helpCode handler that runs received code to client/empty.lua;
  • rewrites the resource’s fxmanifest.lua so that it still claims to be part of the default Cfx.re asset pack;
  • creates an empty server/game.log as its marker.

The Blum Panel warning says not to install the “panel” at all, and that anyone who did should “treat the machine as compromised”.

What the FiveM sandbox blocks, and what it still allows

FXServer runs resources in a sandbox that Cfx says exists “to ensure stability and prevent malicious code execution”. The Lua part arrived in December 2024, when a Cfx.re moderator explained that the changes “were introduced in an effort to sandbox the server more”. The Sandbox page lists these rules:

What a resource triesDefaultOverride in server.cfg
Write files inside its own folderAllowedNot needed
Write files into another resourceBlocked for all file types, error code 13 (“Permission denied”)add_filesystem_permission resourceA write resourceB
Work in the server main folder or outside resource foldersBlockedNone listed
Follow or create symlinks, use .. in a pathBlockedNone listed
os.executeAll commands blockedNone listed
io.popenOnly emulated ls and dirNone listed
Spawn workers or child processesRestrictedadd_unsafe_worker_permission, add_unsafe_child_process_permission
Read a ConVarAllowed for every resourceadd_convar_permission limits it to the resources you list
Lua load()Not blockedNot applicable

Four consequences matter when you hunt for a backdoor:

  • Spreading by writing into other resources is refused. That is how the Cipher Panel infection works, and on a current build the write fails unless an add_filesystem_permission line allows it.
  • Downloading and running code still works. load() is “Not blocked”, and the Sandbox page lists no limit on HTTP requests. FXServer’s Node.js permission check covers the file system, child processes, WASI, workers and the inspector, with no category for network requests. A loader that fetches code and runs it inside its own resource keeps working, which is why the search below matters.
  • Overrides only count at startup. FXServer accepts the permission commands only while it reads its initial configuration. A later call prints, for example, “add_filesystem_permission is only executable before the server finished execution.” A resource therefore cannot grant itself an override by running the command later.
  • Old builds lack parts of it. In March 2026, an owner reported that “after the recent updates of artifacts” a Node.js resource could no longer write into other resources, and another owner later rolled back to a version “without the new restrictions”. The source of FXServer 35245, which became Cfx’s Recommended build on August 20, 2026, already contains the Node.js checks and the permission commands, and so do the sources of 38435 and 38781, the Recommended and Latest builds on the download page on December 2, 2026. Cfx ended connections to older FXServer versions on October 15, 2026.

The sources disagree on one point. The July 2026 Blum Panel warning says the downloaded payload “can run OS commands via FiveM’s os.execute / RDP”, while the Sandbox page says os.execute has “All commands blocked”. Go by the Sandbox page for current builds, and remember that a resource you granted add_unsafe_child_process_permission is allowed to spawn child processes by design.

How to check FiveM scripts for malware, step by step

The steps are the same on FiveM Legacy and FiveM for GTAV Enhanced, and on Qbox, ESX, QBCore and standalone servers. Run them on your live resources after a warning, and on every new resource before it goes live.

  1. Stop the server. Both loaders above act shortly after a resource starts, and the Blum Panel warning’s first step is “Stop and delete the resource immediately.”

  2. Save the search terms in a text file outside the resources folder, for example C:\scan\patterns.txt on Windows or ~/scan/patterns.txt on Linux, one term per line:

    PerformHttpRequest
    load(
    loadstring(
    eval(
    new Function(
    fromCharCode
    string.char
    os.execute
    io.popen
    child_process
    helpCode
    Enchanced_Tabs
    miaus
    \x
  3. Search every Lua and JavaScript file. The resources folder sits in your server data folder, next to server.cfg. The docs’ vanilla examples use C:\FXServer\server-data and ~/FXServer/server-data; replace the paths with your own. In PowerShell on Windows:

    Get-ChildItem -Path C:\FXServer\server-data\resources\ -Recurse -Include *.lua, *.js |
      Select-String -Pattern (Get-Content C:\scan\patterns.txt) -SimpleMatch -CaseSensitive

    -SimpleMatch treats each term as plain text instead of a regular expression, so load( and \x work as written. Each hit shows the file name, the line number and the line. On Linux:

    cd ~/FXServer/server-data/resources
    grep -r -n -F -f ~/scan/patterns.txt --include='*.lua' --include='*.js' .

    -F reads the terms as fixed strings, -f takes them from the file, -r searches every folder and -n prints line numbers. NUI folders hold .js files as well, so they are covered.

  4. Follow the response of every PerformHttpRequest. The function “returns the http response in a callback”, and honest resources use it too. ox_lib’s version check, for example, requests the latest release from the GitHub API, passes the response to json.decode and only compares version numbers. Cipher Panel’s payload passes the response to load and calls the result. Downloaded text that reaches load, loadstring, eval or new Function is remote code execution, whatever the resource claims to do. An address hidden in hex escapes or character codes instead of written out is a finding on its own.

  5. Treat unreadable code as a finding. Asset Escrow, the only protection Cfx permits, supports “Lua, YFT, YDD, and YDR files”, and NUI “is not currently supported”. Qbox’s docs describe an escrowed script as one whose folder has a .fxap file and whose Lua files look like gibberish. Scrambled JavaScript, scrambled NUI code, or scrambled Lua in a folder without a .fxap file is therefore not escrow. For obfuscated code, a Cfx.re moderator’s advice is to “Ask the author for the orginal source code”, and to suspect an infection if it appeared in a resource on its own.

  6. Compare the default resources with the originals. A Cfx.re moderator warns that “resources from cfx-server-data may also be infected”. Servers built from older copies of cfx-server-data can still have [system]/sessionmanager, the resource Cipher Panel targets; cfx-server-data removed it, together with rconlog, hardcap and the [builders] folder, in a cleanup commit dated July 20, 2026. The original resource has exactly three files: fxmanifest.lua, server/host_lock.lua and client/empty.lua. Its manifest reads:

    -- This resource is part of the default Cfx.re asset pack (cfx-server-data)
    -- Altering or recreating for local use only is strongly discouraged.
    
    version '1.0.0'
    author 'Cfx.re <root@cfx.re>'
    description 'Handles the "host lock" for non-OneSync servers. Do not disable.'
    repository 'https://github.com/citizenfx/cfx-server-data'
    
    fx_version 'cerulean'
    games { 'gta4', 'gta5' }
    
    server_script 'server/host_lock.lua'
    client_script 'client/empty.lua'

    The original client/empty.lua holds only three comment lines, starting with “This empty file causes the scheduler.lua to load clientside”. Signs of the Cipher Panel infection are a description line without the quotation marks around “host lock”, '@mysql-async/lib/MySQL.lua' added to the server scripts, code in client/empty.lua, and any extra file, such as server/game.log or server/licence.txt, the two marker files the infection code checks for. Check your other manifests for added MySQL.lua lines too: in 2022 an owner found @mysql-async/lib/MySQL.lua, and in one or two resources @oxmysql/lib/MySQL.lua, added to manifests they never edited, next to code a moderator identified as malware. oxmysql’s docs tell every resource that uses it to add server_script '@oxmysql/lib/MySQL.lua', so that line is normal in a resource with database code; compare each manifest with the author’s release.

  7. List who holds power. In the server console, list_principals prints which principals inherit from which, and list_aces prints every access control entry. Look for identifiers you do not know and resource. principals you never granted. Then read server.cfg and every file it loads with exec, including files inside resources such as the docs’ example exec @vMenu/config/permissions.cfg; the sandbox lets a resource write inside its own folder. Look for:

    • add_principal lines you did not add;
    • add_ace resource.<name> command lines, because a resource can run console commands only “if a resource is permitted by the ACL”;
    • add_filesystem_permission, add_unsafe_worker_permission, add_unsafe_child_process_permission and add_convar_permission lines.

    In txAdmin, review the panel accounts on the Admin Manager page. For framework admin groups, see how to make yourself admin on Qbox, QBCore and ESX.

What each search term catches

TermWhat it doesWhere it appears in known backdoors
PerformHttpRequestSends an HTTP request and hands the response to a callbackCipher Panel’s payload; also honest version checks such as ox_lib’s
load(, loadstring(load turns a string into a function that can be calledCipher Panel’s helpCode handler; both are listed in the July 2026 warning
eval(, new Function(Run a string as JavaScriptThe Blum Panel loader
fromCharCode, string.charBuild a string from character codes, in JavaScript and in LuafromCharCode is listed in the July 2026 warning; Cipher Panel’s payload decodes its address with string.char
os.execute, io.popenRun system commands; blocked, or limited to emulated ls and dir, by the sandboxos.execute is listed in the July 2026 warning
child_processThe Node.js module that spawns subprocesses; restricted by the sandboxNeeds add_unsafe_child_process_permission on current builds
helpCode, Enchanced_TabsNames a Cfx.re moderator tied to known malwareCipher Panel infections
miausA marker name the Blum Panel loader storesListed in the July 2026 warning, also as miauss
\xStarts a hex escape; long runs hide names and addressesCipher Panel’s infection code and the forum samples from 2022 and 2023

Do not rely on the names alone. Cipher Panel’s payload reaches load through a lookup table, so the literal load( is not in it, and the samples posted on the Cfx.re forum in 2022 and 2023 wrote even PerformHttpRequest, load and helpCode as \x escapes. The \x term is the one that finds those lines. The Blum Panel warning lists more JavaScript signs you can add to the file: require("https").get, setImmediate, charCodeAt and long \u00xx blobs.

A clean result does not prove a clean server. When a moderator told an owner to search for Enchanced_Tabs, the same reply added: “You might still not be able to find it if it’s in obfuscated/“encrypted” code.” Escrowed files cannot be searched at all.

How to remove a backdoor and clean the server

  1. Decide whether the machine can still be trusted. If a hit sat in server code, follow the moderator’s advice: “don’t trust a machine that has been infected, reinstall the whole machine. You don’t know how deep your OS got infected.” The Blum Panel warning says the same.

  2. Replace resources instead of deleting lines. “Resources tend to infect others, so you will have to install your server from scratch or go trough every file in your resources folder,” a moderator wrote in 2023, and earlier: “completely removing it from one resource doesn’t mean you removed it”. Reinstall each resource from its original author’s release and install a fresh FXServer artifact with the artifact update guide.

  3. Block the addresses you decoded. The Blum Panel warning says to block them at the firewall. When a user had pointed the Cipher Panel hosts to 127.0.0.1 in the Windows hosts file, a moderator said to keep those entries: “The whole idea of doing that is so it doesn’t reach the cipher panel servers.”

  4. Change every secret the server could read, from a clean device as the Blum Panel warning advises:

    SecretWhat to do
    Server registration key (sv_licenseKey)On the Cfx Portal’s Server Registration Keys page, select the key’s Server ID, select Regenerate, then Yes, and put the new key in your config. Cfx says a regenerated key “is no longer at risk”. See the server license key guide.
    Database passwordChange it with ALTER USER, then put the new password in mysql_connection_string (oxmysql connection string guide).
    txAdmin accountsReview every account on the Admin Manager page and change the passwords (txAdmin login guide).
    RConIf server.cfg sets rcon_password, change it; while it is unset, RCon is disabled.
    Personal accountsThe Blum Panel warning lists Discord, Steam, Google and banking among the logins to change.

    With the account name from your connection string:

    ALTER USER 'fivem_user'@'localhost' IDENTIFIED BY 'new_password';
  5. Remove grants you did not make, restart, and run list_principals and list_aces again. The FiveM ACE permissions guide explains remove_ace and remove_principal.

Keep backdoors out of your server

  • Choose resources carefully. Cfx’s own words: “Use resources at your own risk. Resources are community-driven, and you should choose them carefully.” Run the search on each new resource and add resources one at a time on a test server. Qbox’s docs give the reason: “Doing one at a time means that when something breaks, you know which script did it.” The full routine is in how to install FiveM scripts safely.

  • Grant sandbox overrides rarely. The Sandbox page says: “Only enable these for resources you trust completely.” A README that asks for one should explain why.

  • Hide the database login from other resources. By default, every resource can read every ConVar. One line in server.cfg changes that:

    add_convar_permission oxmysql read mysql_connection_string

    Once a ConVar has a permission, “only explicitly permitted resources can access it”, and FXServer’s source hands every other resource the default value it asked for. Add a line for any other resource that needs the string; searching your resources for mysql_connection_string the same way as in step 3 shows which ones read it. oxmysql’s docs also say to set the string with set only: “Make sure you only ever use set.”

  • Watch the console for sandbox refusals. Lua file functions return “Permission denied”. Node.js resources produce lines such as Filesystem write permission check from '<resource>' ... - write not allowed or Child process permission check from '<resource>' ... - child spawn not allowed. A May 2026 forum log shows the first one under the [ c-scripting-node] prefix, followed by Node’s “Access to this API has been restricted.” A resource with no reason to touch other folders that triggers these lines needs a closer look.

  • Keep ACE grants narrow, so that an infected resource cannot run every console command.

The same checks apply to every resource you add, including the ones in FiveCrate’s scripts catalogue.

FiveM Legacy and FiveM for GTAV Enhanced

  • The search, the removal and the secret rotation are the same on both platforms.
  • The Sandbox page gives one set of rules and does not divide them by platform.
  • Cfx lists Asset Escrow as “Not implemented yet” on FiveM for GTAV Enhanced.

Troubleshooting

“Resource contains prohibited logic” again after you removed the resource

The infection has probably spread. The Resource FAQ warns that one resource can infect others, so another resource may still carry the code. Run the search on every resource, then rebuild as described above.

The backdoor code comes back after you delete it

Something you did not clean is writing it back. A moderator’s 2022 note applies: “completely removing it from one resource doesn’t mean you removed it, you will have to check every resource.” When an owner reported in April 2022 that the infection code returned after every server restart, the same moderator advised reinstalling the machine and looking for the initial payload, for example code with Enchanced_Tabs. Check the default resources in step 6 as well. In the 2022 thread, owners later traced the reinfection to the yarn and webpack builder resources, and one suggested installing a new artifact.

Random local variables or server_scripts lines appear in many resources

This matches the 2022 report of odd locals in scripts and a server_scripts { '@mysql-async/lib/MySQL.lua' } line nobody added. The moderator’s reading: “This often means your server has been infected by some kind of malware which adds itself to every resource.” Remove it from every resource or reinstall from scratch.

The server shows a message that it was “blocked for stolen scripts”

Cfx wrote in March 2022 that owners asked why their server was “blocked for stolen scripts” when Cfx had not blocked it. The message came from a backdoor in the assets. Treat it as an infection and follow the removal steps.

A trusted resource now fails with “Permission denied” or “write not allowed”

The sandbox refused a write into another resource. In a May 2026 thread, a resource could not write into another one for exactly this reason, and a Cfx.re moderator pointed to the Sandbox page’s file system permissions. If you trust both resources, add add_filesystem_permission <resourceA> write <resourceB> to server.cfg and restart.

If the line seems to be ignored:

  • Put it in server.cfg, not in the live console. After startup FXServer refuses the command with “add_filesystem_permission is only executable before the server finished execution.”
  • Use the exact resource names on both sides. FXServer looks up the pair of names, writer first, then target.
  • Check your build. From December 2024 until May 6, 2026, the Sandbox page said that author names had to match for the permission to work, and a March 2026 forum reply explained this as the author field in both resources’ fxmanifest.lua. The source of FXServer 35245 and of build 38781 checks only the two resource names.

The search found nothing, but you still suspect a backdoor

Obfuscated or escrowed code can hide a loader from a text search. Rebuild from clean copies and rotate the secrets anyway. If server code may have run, the moderator’s advice to reinstall the machine still applies.

Next Steps

Official documentation and repository references