Skip to main content
mySites.guru
Joomla securityJoomla 6.2.2 and 5.4.12 are out, fixing a Critical file cache flaw: update nowWhat changed

Phoca Gallery 6.1.7 fixes a stored XSS in YouTube video links

Phoca Gallery 6.1.7 fixes a stored XSS in YouTube video links

On 19 November 2026 Phoca released Phoca Gallery 6.1.7, and the release notes open with “This is a security release.” Phoca’s announcement says what was fixed: “Fixed stored XSS in YouTube links: the video ID is now strictly validated and the embed URL is escaped on output”. It comes exactly one month after Phoca Gallery 6.1.6 fixed a stored XSS in the EXIF data of the same Joomla extension.

For a site running the gallery, the change means this: a YouTube link saved on a gallery image could hold more than a video ID, and Phoca Gallery wrote whatever it held into the page. Anyone who then opens that item runs the link author’s script in their own browser, on your site. The fix is on offer to Joomla 6 sites only. The flaw is CVE-2026-129418, which the Joomla CNA scores 7.5 High.

TL;DR

  • Phoca Gallery 3.1.0 to 6.1.6 takes the video ID out of a YouTube link without validating it and writes it straight into the embed markup
  • A crafted link breaks out of the HTML attribute and runs as script for anyone who opens that gallery item, including a logged-in administrator
  • To plant one, an attacker needs back-end rights to edit gallery images, or the front-end YouTube upload feature, which is off by default
  • 6.1.7 fixes it, and only on the Joomla 6 line. The releases Phoca’s update feed offers to Joomla 5 (5.1.3), Joomla 4 (4.5.5) and Joomla 3 (3.2.8) are all affected, with no patched successor
  • Updating to 6.1.7 also defuses a malicious link already stored, because the stored value is re-validated every time it is rendered
  • The flaw is CVE-2026-129418, scored CVSS 4.0 7.5 High by the Joomla CNA. There is no GitHub security advisory
  • A site that updated to 6.1.6 for last month’s EXIF flaw is still exposed to this one
7.5CVSS 4.0

CVE-2026-129418Stored XSS through a Phoca Gallery YouTube video link

HighJoomla CNA

A crafted YouTube link saved on a gallery item runs script in the browser of anyone who opens that item, in the context of your site. That can hijack a logged-in session, including an administrator's.

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Needs back-end edit rights or front-end YouTube uploadFires on the image and lightbox viewsFix only on the Joomla 6 line
What does this mean?

CVSS 4.0 scores how severe a flaw is, from 0 (no impact) to 10 (critical). Each pair of letters in the string above is one metric; here is what this one's says.

How it is reached

AV:N
Network: Reachable across the internet
AC:L
Low: Nothing to work around, it just works
AT:P
Present: Needs a particular deployment or race to line up
PR:L
Low: Any logged-in account will do
UI:P
Passive: Someone has to visit a page

What it does to the site

VC:H
High: Everything the site holds can be read
VI:H
High: Data and files can be altered at will
VA:L
Low: The site slows or stutters

What it does beyond the site

SC:N
None: Other systems keep their data
SI:N
None: Other systems keep their integrity
SA:N
None: Other systems stay up

The score is the Joomla CNA’s, from the CVE record published on 19 November 2026, and its vector treats the vulnerable configuration as a precondition (AT:P). Phoca’s announcement does not name a reporter; the CVE record credits Łukasz Rybak. The flaw is not in the CISA KEV catalogue (checked 19 November 2026).

Phoca Gallery lets a gallery item have a YouTube video attached to it. The link is stored with the image in a videocode column, and when the item is shown the extension turns that link into an embedded player. The code that does it is the PhocaGalleryYoutube class in admin/libraries/phocagallery/youtube/youtube.php.

Before 6.1.7, the getCode() method treated everything after the first = in the link as the video ID, or everything after youtu.be/ for the short form. Nothing checked that the result looked like a YouTube ID. The one test on the link was PhocaGalleryUtils::isURLAddress(), a regular expression that accepts any text after the host and path, quote marks included. A strip_tags() call removed HTML tags, which does nothing about quotes.

displayVideo() then joined that “ID” directly into the player markup:

// Phoca Gallery 6.1.6 and earlier, in displayVideo()
<iframe src="//www.youtube.com/embed/'.$code.'" ...>

// Phoca Gallery 6.1.7, in outline
// 1. isValidCode(): exactly 11 characters of A-Z, a-z, 0-9, underscore or hyphen
// 2. htmlspecialchars() on the ID before it is written into an https embed URL

A link whose “ID” contains a quote mark closes the src attribute early, and the browser reads the rest of it as more of the page. Text the extension treated as eleven harmless characters is parsed as markup, with your site’s origin, for whoever is looking at the item.

It is stored rather than reflected. The link sits in the database and is rendered in two places: the image detail view, and, on Phoca Gallery 4.4.x and later, the PhotoSwipe lightbox markup in the category view, where it is written into a data-video attribute. Releases before 4.4 used the older <object> and <embed> Flash markup with the same raw ID in it. Nothing in the page URL shows a visitor that the item is different from any other.

Two kinds of account can save a YouTube link on a gallery item:

  • Any back-end user who can edit Phoca Gallery images. The video code field on the image form is saved with filter="raw", so what is typed is what is stored.
  • A front-end user with YouTube upload available to them. This route needs a lot to be in place: the YouTube upload option switched on (it is off by default, youtube_upload = 0), front-end upload displayed, a user with upload rights on that category and a user folder, PHP curl, and a YouTube API key configured, because the import asks the YouTube API for the video’s details.

The CVE record describes the front-end route, “users with frontend upload permission”. The back-end field stores the same raw value and is rendered by the same code, so both routes count.

The person it fires on needs nothing. Anyone who opens the item gets the script, and when that person is a logged-in administrator, their session can then be used. On a site where content editors manage the gallery and an administrator reviews it, that is a path from a gallery editor’s account to an administrator’s session.

6.1.7 rewrites the YouTube handling around one rule: a YouTube ID is exactly 11 characters of A-Z, a-z, 0-9, underscore or hyphen, and anything else is rejected. A new isValidCode() method enforces it, and the rest of the class now goes through that check.

  • getCode() parses the link with parse_url and accepts only youtu.be, youtube.com and youtube-nocookie.com hosts (with a www., m. or music. prefix stripped), in the /watch?v=, /embed/, /v/, /shorts/ and /live/ shapes
  • displayVideo() derives and validates the ID again from the stored value on every render, escapes it with htmlspecialchars, and uses https for the embed
  • importYtb() stores a canonical https://www.youtube.com/watch?v= link built from the validated ID in place of the raw input, and applies rawurlencode to the values it sends in the YouTube API request
  • The title and description that come back from the YouTube API have their markup removed with strip_tags before they are saved
  • TLS certificate verification is no longer forced off for the YouTube import. The old code had a line, $ssl = 0;, that overrode the youtube_api_ssl setting

Phoca’s changelog lists four items under Security, among them “Fixed unvalidated YouTube video ID being used in the thumbnail file name”, plus one ordinary fix for the front-end YouTube upload redirect failing with a 404 after the item was saved.

For a site that may already have been targeted, the second bullet is the useful one. Because displayVideo() validates on every render, and not only when a link is saved, a crafted link stored before the update stops working the moment 6.1.7 is installed. The code comment says as much: rows saved before the fix may contain attacker-controlled data. The old link stays in the videocode column, but it no longer reaches the page as markup.

That is the right way to fix a stored flaw. A fix that only validates new input leaves every site to hunt through its own history, and most never will. Validating at the point of output cleans up the past as a side effect of installing the update.

6.1.7 is also the first Phoca Gallery release whose manifest and installation XML point Joomla at a changelog, changelog6.xml, so the Joomla 6 update screen can show what changed before you apply it. For a security release that is a welcome addition.

Phoca Gallery 3.1.0 up to and including 6.1.6. The same unvalidated ID goes into the embed markup in 3.1.0, 3.1.5, 3.2.3, 4.1.2, 4.3.4, 4.4.3, 4.5.5, 5.1.3 and 6.1.6, so every release line in that range is affected. Phoca Gallery 3.0.2 has no YouTube support, so the range starts at 3.1.0.

The CVE record for CVE-2026-129418 lists a narrower range, 4.2.0 to 6.1.6. The same code is in 3.1.0 to 4.1.x, so those older builds are affected too, and mySites.guru flags them. Act on 3.1.0 to 6.1.6.

Phoca maintains one release line per Joomla generation, and only the Joomla 6 line received the fix:

Joomla versionNewest Phoca Gallery the updater offersHas the YouTube XSS fix?
Joomla 66.1.7Yes
Joomla 55.1.3No
Joomla 44.5.5No
Joomla 33.2.8No

The table comes from Phoca’s update manifest, which matches each Joomla generation to one release on a targetplatform pattern. 6.1.7 is described as a native Joomla 6 extension, and there is no backport on the 3.x, 4.x or 5.x lines.

Joomla’s updater can only offer what the vendor’s feed offers, and it discards any offered version that is not higher than the one installed. For Phoca Gallery on an older Joomla, that produces two different failures:

  • A site on the 3.x, 4.x or 5.x line is offered 3.2.8, 4.5.5 or 5.1.3. All three are affected, so a site owner can apply every update on the screen in good faith and still be exposed.
  • A Joomla 4 or 5 site already running a 6.x build is offered a lower version than it has. Joomla shows no update at all, and the site looks current while it runs 6.1.6 or older.

Across the Joomla sites mySites.guru monitors with an affected Phoca Gallery, about 57% are on the 6.x line and can take 6.1.7, on Joomla 6 through the normal updater. About 43% are on 3.x, 4.x or 5.x builds that have no fixed release. Most of those are old 4.x builds, and roughly a third of all affected installs are on 4.x releases older than 4.5.0.

Last month’s EXIF flaw had a published range that started at 4.5.0, so those sites were outside it and had no reason to act. The YouTube flaw reaches back to 3.1.0, and they are inside it.

An empty update list is not proof you are patched

On Joomla 3, 4 and 5, Phoca Gallery can show no available update while running an affected version, or offer an update that is itself affected. Read the installed Phoca Gallery version number yourself and compare it with 6.1.7.

What to do on each Joomla version

  1. Joomla 6: update Phoca Gallery to 6.1.7 through the normal Joomla updater, then confirm the version number. Stored links are neutralised by the update itself.
  2. Joomla 5 and Joomla 4: the 5.1.3 and 4.5.5 releases the updater offers do not fix this. Take a backup, then try the 6.x package from the GitHub release by hand, on a copy of the site first, since 6.1.7 is described as a native Joomla 6 extension. If it will not install or run, the choices are to move the site to Joomla 6 or to remove the gallery.
  3. Joomla 3: there is no fixed release and none is offered. Either the component goes or the site moves to a Joomla version that has one.
  4. If you cannot update yet, on any version: switch off front-end YouTube upload in Phoca Gallery’s options, restrict who can edit gallery images in the back end, and review the YouTube links on existing items. A normal link ends at the video ID. Anything after the ID that does not belong in a YouTube URL, quote marks especially, is the thing to look for.
  5. On any version, ask who had access: this is stored XSS, so the question is who could have saved a link. Review which accounts could edit gallery images, and which could upload from the front end if YouTube upload was ever enabled. Treat an administrator who opened a suspect item as having a session that may have been used.

See which of your sites are still on Joomla 3, 4 or 5

mySites.guru checks every connected site for this automatically and flags it the moment it appears. It runs as part of the full audit on every connected site.

The Phoca Gallery version on its own does not tell you what to do. You need the Joomla version beside it, because that decides whether the updater will deliver 6.1.7, whether you are testing a package by hand, or whether the site has no route to a fix at all.

mySites.guru holds both for every connected Joomla site. We added Phoca Gallery 3.1.0 to 6.1.6 to our vulnerability database on the day of the release, so every connected site running an affected version is flagged on its dashboard, with the Joomla version on the same screen. The full list of Phoca Gallery rules is on the Phoca Gallery page of the Joomla Vulnerability Database. For an agency, that turns one vendor announcement into a sorted work list without logging in to a single site. The Joomla 6 sites can be updated in one batch with the mass updater. What is left is the short list that needs a decision: the Joomla 4 and 5 sites for a manual package or a migration plan, and the Joomla 3 sites where the gallery has to be weighed against the risk. Those are client conversations, and it is better to start them with a list than to find out which sites were affected after one of them is defaced.

The same view works across a portfolio of Joomla sites of any size, and the next time a vendor releases a fix for one Joomla line only, the flag appears the same way. The vulnerability alerts, the version audit and the mass updater are part of every subscription.

Phoca Gallery 6.1.6, released on 19 October 2026, fixed CVE-2026-102786, a stored XSS through a photo’s EXIF data that the Joomla CNA scored 8.6 High, with a range of 4.5.0 to 6.1.5. The YouTube embed code was unchanged in that release. A site that updated to 6.1.6 and considered the gallery dealt with has been exposed to this second flaw the whole time, and needs 6.1.7.

The two flaws have the same root: a value the extension thought of as data, written into an HTML attribute without being checked or escaped. EXIF looked like camera output. A YouTube link looks like configuration, a setting an editor pastes in once, and that is why no one reviews it as input. But a field that accepts text from a user and prints it on a page is input, whatever the label on the form says, and a video link field deserves the same suspicion as a comment box.

The distribution problem is familiar too. The Phoca Cart product filter SQL injection, the Phoca Cart download IDOR and the Phoca Download upload flaw were all fixed on the current Joomla line while older lines kept a version number that looked current, and so was Phoca Commander 6.1.5, a second round of fixes for the same file actions. Phoca is quick with the fix each time, and 6.1.7’s validate-on-render approach is better than most. The gap is in who receives it. If you still run Joomla 3, where Phoca’s extensions stand on Joomla 3 is the wider question to answer before the next release.

Phoca Gallery 6.1.6 fixes a stored XSS hidden in a photo's EXIF dataRead the full post

Timeline

  1. Phoca Gallery 6.1.6 fixes an EXIF stored XSS

    The release fixed CVE-2026-102786 in the photo info view. The YouTube embed code was unchanged in it.

  2. Phoca releases Phoca Gallery 6.1.7 as a security release

    It fixes the YouTube link stored XSS on the Joomla 6 line. There is no 3.x, 4.x or 5.x release.

  3. Joomla CNA publishes CVE-2026-129418

    Scored 7.5 High, with an affected range of 4.2.0 to 6.1.6.

  4. mySites.guru flags every affected site

    Phoca Gallery 3.1.0 to 6.1.6 is added to the vulnerability database, so connected Joomla sites are flagged on their dashboards.

Further Reading

Frequently Asked Questions

What did Phoca Gallery 6.1.7 fix?
A stored cross-site scripting flaw in the YouTube video link that can be attached to a gallery image. Before 6.1.7 the extension took the video ID from the link without validating it and wrote it straight into the embed markup, so a crafted link could break out of the HTML attribute. 6.1.7 accepts only a real 11-character YouTube ID and escapes it on output.
Which Phoca Gallery versions are affected by the YouTube link flaw?
Phoca Gallery 3.1.0 up to and including 6.1.6. Every release line in that range writes the video ID into the page unvalidated. Phoca Gallery 3.0.2 has no YouTube support, and 6.1.7 has the fix.
Who can exploit the Phoca Gallery YouTube link flaw?
Someone who can save a YouTube link on a gallery item. That is any back-end user who can edit Phoca Gallery images, or a front-end user with upload rights on a category when the front-end YouTube upload option is switched on, which it is not by default. The script then runs for anyone who opens that item, including a logged-in administrator.
Is there a CVE for the Phoca Gallery 6.1.7 fix?
Yes. It is CVE-2026-129418, published on 19 November 2026 and scored CVSS 4.0 7.5 High by the Joomla CNA. The CVE record lists Phoca Gallery 4.2.0 to 6.1.6 as affected, but the same code is in 3.1.0 to 4.1.x, so treat 3.1.0 to 6.1.6 as the range. There is no GitHub security advisory, and Phoca describes 6.1.7 as a security release in its own announcement.
Why does my Joomla 3, 4 or 5 site not offer Phoca Gallery 6.1.7?
Phoca's update feed offers one release per Joomla generation: 6.1.7 to Joomla 6, 5.1.3 to Joomla 5, 4.5.5 to Joomla 4 and 3.2.8 to Joomla 3. Only 6.1.7 has the fix, and no backport exists on the 3.x, 4.x or 5.x lines, so Joomla's updater cannot deliver it to those sites.
Does updating to Phoca Gallery 6.1.7 remove a malicious link that is already stored?
It stops it working. 6.1.7 re-validates the stored value every time it renders a video, so a crafted link saved before the update no longer reaches the page as markup. The link itself stays in the database, so it is still worth reviewing the YouTube links on existing gallery items.
EU icon: AI MODIFIEDWritten and edited by a human, with AI assistance. Our approach to AI

What our users say

Tomasz
TomaszAL-TAIR
★★★★★

I've been managing multiple Joomla! websites for years, and I honestly can't believe I wasn't using mySites.guru sooner. It has completely changed the way I maintain and monitor my sites. The service is incredibly useful, making it easy to keep track of updates, security, backups, and the overall health of all my Joomla! installations from one place. It's a huge time-saver and makes managing multiple websites so much more convenient. On top of that, the pricing is extremely attractive for everything you get. The value is outstanding, especially if you manage more than one Joomla! website. I highly recommend mySites.guru to anyone working with Joomla!. It's one of those tools that, once you start using it, you wonder how you ever managed without it.

Read more reviews
Christof Rimle
Christof RimleRimle IT Services
★★★★★

The centralized management (backups, updates, malware protection, etc.) for all 115 of my websites makes my job so much easier. I also appreciate the proactive notifications about security vulnerabilities and the extremely fast response time to support requests! Thank you very much!

Read more reviews

Read all 313 reviews →

Get an email when the next post is published

Ready to Take Control?

One free audit of one site · no card · about 2 minutes to connect

Get Your Free Site Audit