CVE-2023-49337 (PHP, published 2024-02-29T01:41Z)
Description: value: Concrete CMS before 9.2.3 allows Stored XSS on the Admin Dashboard via /dashboard/system/basics/name. (8.5 and earlier are unaffected.)
Severity: nan (CVSS v3 base score: )
Weakness: NVD-CWE-noinfo \u2014 Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Repository: https://github.com/concretecms/concretecms
Files changed:
concrete/attributes/site/controller.php
concrete/authentication/concrete/controller.php
concrete/blocks/top_navigation_bar/controller.php
concrete/controllers/single_page/dashboard/system/multisite/sites.php
concrete/controllers/single_page/dashboard/system/seo/bulk.php
concrete/controllers/single_page/register.php
concrete/elements/header_required.php
concrete/single_pages/dashboard/system/express/entities/view_details.php
concrete/single_pages/login.php
concrete/src/Application/UserInterface/Sitemap/TreeCollection/Entry/Group/SiteGroup.php
concrete/src/Application/UserInterface/Sitemap/TreeCollection/Entry/SiteEntry.php
concrete/src/Entity/Attribute/Value/Value/SiteValue.php
concrete/src/Entity/Site/SiteTree.php
concrete/src/Form/Service/Widget/SiteSelector.php
concrete/src/Install/InstallerOptions.php
Commit message: Sanitize site name everywhere


Vulnerable code:
            $sites[$site->getSiteID()] = $site->getSiteName();
            return $site->getSiteName();
            $mh->addParameter('siteName', tc('SiteName', $this->app->make('site')->getSite()->getSiteName()));
        $brandingText = $site->getSiteName();
            $brandingText = $site->getSiteName();
            $breadcrumb->add(new Item('', $site->getSiteName()));
            $siteName = $this->app->make('site')->getSite()->getSiteName();
                    $mh->addParameter('siteName', tc('SiteName', \Core::make('site')->getSite()->getSiteName()));
            $seo->setSiteName(tc('SiteName', $site->getSiteName()));
                            <?php echo $site->getSiteName() ?>
    $siteName = $site->getSiteName();
        return $this->site->getSiteName();
        return $this->site->getSiteName();
            return (string) $this->site->getSiteName();
        return $this->getLocale()->getSite()->getSiteName();
                $sites .= '<option ' . ($site->getSiteID() == $siteID ? 'selected' : '') . ' value="' . $site->getSiteID() . '">' . $site->getSiteName() . '</option>';
        return $this->siteName;

Fixed code:
            $sites[$site->getSiteID()] = h($site->getSiteName());
            return h($site->getSiteName());
            $mh->addParameter('siteName', h(tc('SiteName', $this->app->make('site')->getSite()->getSiteName())));
        $brandingText = h($site->getSiteName());
            $brandingText = h($site->getSiteName());
            $breadcrumb->add(new Item('', h($site->getSiteName())));
            $siteName = h($this->app->make('site')->getSite()->getSiteName());
                    $mh->addParameter('siteName', h(tc('SiteName', \Core::make('site')->getSite()->getSiteName())));
            $seo->setSiteName(h(tc('SiteName', $site->getSiteName())));
                            <?php echo h($site->getSiteName()); ?>
    $siteName = h($site->getSiteName());
        return h($this->site->getSiteName());
        return h($this->site->getSiteName());
            return (string) h($this->site->getSiteName());
        return h($this->getLocale()->getSite()->getSiteName());
                $sites .= '<option ' . ($site->getSiteID() == $siteID ? 'selected' : '') . ' value="' . $site->getSiteID() . '">' . h($site->getSiteName()) . '</option>';
        return h($this->siteName);