CVE-2022-24742: Sylius/sylius Sensitive Information Exposure Vulnerability
MODERATECVE-2022-24742 is a MODERATE (CVSS 5.0) sensitive information exposure vulnerability (CWE-213: Exposure of Sensitive Information Due to Incompatible Policies) affecting Sylius/sylius libraries in the Packagist ecosystem. The issue involves sensitive information exposure in sylius. Remediation is available by upgrading affected packages to version 1.9.10, 1.10.11, 1.11.2.
CVE-2022-24742 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2022-24742
To remediate this vulnerability, upgrade all affected Sylius/sylius dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade sylius/sylius to 1.9.10
Upgrade sylius/sylius to 1.10.11
Upgrade sylius/sylius to 1.11.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sylius/sylius
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-24742, inspect your project dependencies for Sylius/sylius:
inspect dependencies for sylius/sylius
Analyze the terminal output to locate any version of Sylius/sylius in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.10), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-213: Exposure of Sensitive Information Due to Incompatible Policies, where the product's intended functionality exposes information to certain actors in accordance with the developer's security policy, but this information is regarded as sensitive according to the intended security policies of other stakeholders such as the product's administrator, users, or others whose information is being processed. In Sylius/sylius, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-24742 Affected Sylius/sylius Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sylius/sylius
|
Packagist |
< 1.9.10
|
1.9.10
|
|
sylius/sylius
|
Packagist |
≥ 1.10
< 1.10.11
|
1.10.11
|
|
sylius/sylius
|
Packagist |
≥ 1.11
< 1.11.2
|
1.11.2
|
References
Frequently Asked Questions
What is CVE-2022-24742?
Which Sylius/sylius versions are affected?
What version fixes CVE-2022-24742?
Is sylius/sylius affected?
What is the CVSS score of CVE-2022-24742?
What CWE is associated with CVE-2022-24742?
How can I check Packagist dependencies for CVE-2022-24742?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7563-75j9-6h5p",
"modified" : "2022-03-15T21:47:08Z",
"published" : "2022-03-14T22:26:58Z",
"aliases" : [ "CVE-2022-24742" ],
"summary" : "Sensitive Information Exposure in Sylius",
"details" : "### Impact\nAny other user can view the data if the browser tab remains open after logging out. Once someone logs out and leaves the browser open, the potential attacker may use the back button to see the content exposed on given screens. No action may be performed though, and any website refresh will block further reads. It may, however, lead to a data leak, like for example customer details, payment gateway configuration, etc.- but only if these were pages checked by the administrator. \n\nThis vulnerability requires full access to the computer to take advantage of it.\n\n### Patches\nThe issue is fixed in versions: 1.9.10, 1.10.11, 1.11.2 and above.\n\n### Workarounds\nThe application must strictly redirect to the login page even when the browser back button is pressed. Another possibility is to set more strict cache policies for restricted content (like no-store). It can be achieved with the following class:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\EventListener;\n\nuse App\\SectionResolver\\ShopCustomerAccountSubSection;\nuse Sylius\\Bundle\\AdminBundle\\SectionResolver\\AdminSection;\nuse Sylius\\Bundle\\CoreBundle\\SectionResolver\\SectionProviderInterface;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Symfony\\Component\\HttpKernel\\Event\\ResponseEvent;\nuse Symfony\\Component\\HttpKernel\\KernelEvents;\n\nfinal class CacheControlSubscriber implements EventSubscriberInterface\n{\n /** @var SectionProviderInterface */\n private $sectionProvider;\n\n public function __construct(SectionProviderInterface $sectionProvider)\n {\n $this->sectionProvider = $sectionProvider;\n }\n\n public static function getSubscribedEvents(): array\n {\n return [\n KernelEvents::RESPONSE => 'setCacheControlDirectives',\n ];\n }\n\n public function setCacheControlDirectives(ResponseEvent $event): void\n {\n if (\n !$this->sectionProvider->getSection() instanceof AdminSection &&\n !$this->sectionProvider->getSection() instanceof ShopCustomerAccountSubSection\n ) {\n return;\n }\n\n $response = $event->getResponse();\n\n $response->headers->addCacheControlDirective('no-cache', true);\n $response->headers->addCacheControlDirective('max-age', '0');\n $response->headers->addCacheControlDirective('must-revalidate', true);\n $response->headers->addCacheControlDirective('no-store', true);\n }\n}\n```\n\nAfter that register service in the container:\n\n```yaml\nservices:\n App\\EventListener\\CacheControlSubscriber:\n arguments: ['@sylius.section_resolver.uri_based_section_resolver']\n tags:\n - { name: kernel.event_subscriber, event: kernel.response }\n```\n\nThe code above requires changes in `ShopUriBasedSectionResolver` in order to work. To backport mentioned logic, you need to replace the `Sylius\\Bundle\\ShopBundle\\SectionResolver\\ShopUriBasedSectionResolver` class with:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\SectionResolver;\n\nuse Sylius\\Bundle\\CoreBundle\\SectionResolver\\SectionInterface;\nuse Sylius\\Bundle\\CoreBundle\\SectionResolver\\UriBasedSectionResolverInterface;\nuse Sylius\\Bundle\\ShopBundle\\SectionResolver\\ShopSection;\n\nfinal class ShopUriBasedSectionResolver implements UriBasedSectionResolverInterface\n{\n /** @var string */\n private $shopCustomerAccountUri;\n\n public function __construct(string $shopCustomerAccountUri = 'account')\n {\n $this->shopCustomerAccountUri = $shopCustomerAccountUri;\n }\n\n public function getSection(string $uri): SectionInterface\n {\n if (str_contains($uri, $this->shopCustomerAccountUri)) {\n return new ShopCustomerAccountSubSection();\n }\n\n return new ShopSection();\n }\n}\n```\n\n```yaml\nservices:\n sylius.section_resolver.shop_uri_based_section_resolver:\n class: App\\SectionResolver\\ShopUriBasedSectionResolver\n tags:\n - { name: sylius.uri_based_section_resolver, priority: -10 }\n```\n\nYou also need to define a new subsection for the Customer Account that is used in the above services:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\SectionResolver;\n\nuse Sylius\\Bundle\\ShopBundle\\SectionResolver\\ShopSection;\n\nclass ShopCustomerAccountSubSection extends ShopSection\n{\n}\n```\n\n### References\n* Originally published at https://huntr.dev/\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues)\n* Email us at security@sylius.com\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "sylius/sylius"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "sylius/sylius"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.10"
}, {
"fixed" : "1.10.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "sylius/sylius"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.11"
}, {
"fixed" : "1.11.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Sylius/Sylius/security/advisories/GHSA-7563-75j9-6h5p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24742"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Sylius/Sylius"
}, {
"type" : "WEB",
"url" : "https://github.com/Sylius/Sylius/releases/tag/v1.10.11"
}, {
"type" : "WEB",
"url" : "https://github.com/Sylius/Sylius/releases/tag/v1.11.2"
}, {
"type" : "WEB",
"url" : "https://github.com/Sylius/Sylius/releases/tag/v1.9.10"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-213", "CWE-668" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-14T22:26:58Z",
"nvd_published_at" : "2022-03-14T20:15:00Z"
}
}