Skip to main content
mySites.guru
4+ live

Joomla extension security alerts (28 Aug) ZOO: unauth RCESourcerer 16.0.0Fabrik 4.7.2JCE 2.9.99.10

Joomla

The Default Database Prefix

The Default Database Prefix

A jos_ Joomla database prefix isn't a vulnerability by itself. It's a force multiplier for one, and a sign the site started life on a much older Joomla version.

What this check and mySites.guru tool looks at on your site

Every table Joomla creates in your database sits behind a prefix, a short string bolted onto the front of the table name, such as jos_users or xk3f2_users. This check reads the db_prefix value out of your site’s Joomla configuration and flags one specific value: jos_, the prefix every Joomla installation used before randomisation existed. It is one of the automated database checks covered in how to check Joomla database security.

The one obstacle it removes for an attacker

A guessable prefix is not a hole in itself. Nobody can get into your database just by knowing the prefix. What it does is remove one of the two unknowns an attacker needs when they try to exploit a separate flaw, usually a SQL injection bug in a vulnerable extension somewhere on the site.

Think of it as the difference between a blind attack and a targeted one. A classic SQL injection technique is a UNION-based query, where the attacker appends a second query onto a vulnerable one to pull data out of a table that has nothing to do with the page they are attacking, often the users table, to lift usernames and password hashes. To do that, the attacker’s payload has to name the table and, usually, its columns. Get the name wrong and the query simply fails, the injection point stays unproven, and most automated tooling moves on to an easier target rather than spending time brute-forcing table names it cannot see.

Point that same tooling at a site still running jos_users, and the guesswork disappears. Mass-exploitation scripts routinely ship with jos_ hardcoded as the first prefix to try, precisely because enough sites still use it to make the attempt worthwhile before falling back to guessing. The prefix does not create the SQL injection flaw. It removes the one obstacle standing between “there is a flaw here” and “here is your data,” for any attacker who finds one.

What a jos_ prefix on a live site actually tells you

The more useful signal is not the prefix itself but what it implies about the site’s history. Joomla began randomising the database prefix at install time from version 1.7 onward, released in 2011. Every fresh Joomla installation since then has generated something like xk3f2_ automatically, with no action required from the person installing it.

That means a site still running jos_ today was not installed recently. It was almost certainly first built on Joomla 1.5 or 1.6, sometime before 2011, and has been upgraded in place through every major version since, carrying the original prefix forward the whole way. On its own that is not damning. Plenty of well-run sites have a long history. But it is worth knowing, because a codebase with that much history often has other legacy decisions sitting alongside it: old extensions that were never removed, database users provisioned under an earlier, laxer standard, or configuration nobody has looked at since the site was rebuilt on newer Joomla. The prefix is a visible marker for a site that is worth a wider look, not just a database setting.

Any prefix but jos_

A prefix that is not jos_. It does not need to be secret, clever, or memorable. It just needs to not be the one value every automated scanner already assumes by default. The random string Joomla’s installer generates today is exactly what you want.

How to fix it

Back up before you touch this

Renaming the prefix means renaming every table and updating the configuration file to match, in the same operation. Get a full database backup in hand before you start.

  1. Take a complete backup of your database. Do not skip this step; if the rename is interrupted partway through, you need a way back.
  2. If you have Akeeba Backup or Akeeba Admin Tools installed, use its “Rename Table Prefix” feature. It renames every table and rewrites configuration.php for you in a single pass, and is the safest route if it is available to you.
  3. Without that extension, do it by hand. Log in to phpMyAdmin, usually reachable from your hosting control panel, and rename each table from jos_tablename to your new prefix. Then open configuration.php in your site’s root folder and change the $dbprefix value to match exactly.
  4. Log in to https://yoursite.com/administrator and check the front end loads normally before you delete the backup.
  5. Check any older, less actively maintained extensions you rely on. A small number of poorly written extensions hardcode jos_ instead of reading the configured prefix, and a rename can break them. This is uncommon, but it is worth a quick click through your site’s key pages before you consider the job finished.

What mySites.guru does about it

We read the configured prefix on every snapshot and flag jos_ when we see it. There is no one-click fix for this, because renaming every table is a structural database change rather than a setting to toggle, so we surface it clearly and leave the change to you with a backup in hand.

This check runs alongside three others in the same family: whether your database user is running as root, whether that user can see other databases on the server, and whether leftover installer backup tables are still sitting in your live database.

The Default Database Prefix

mySites.guru checks every connected site for this automatically and flags it the moment it appears. These run twice a day on every connected site.

Further Reading

Frequently Asked Questions

Is a guessable database prefix a vulnerability on its own?
No. A predictable prefix does not let anyone into your database by itself. It only becomes a problem when combined with a separate flaw, usually a SQL injection bug in an extension, because it removes one of the two unknowns an attacker would otherwise have to guess.
Why do I still have jos_ if I only installed Joomla recently?
You almost certainly do not. Joomla has generated a random prefix at install time since version 1.7, released in 2011. A live jos_ prefix today is a strong sign the site was first installed on Joomla 1.5 or 1.6 and has been upgraded in place ever since, sometimes for over a decade.
Will changing the prefix break my site?
Not if you do it properly. Every table needs to be renamed and the configuration file updated to match in the same operation. Take a full backup first, and test both the front end and the administrator login before you consider the change finished.