GHSA-w2fr-65vp-mxw3 CVE-2019-10912
Deserialization of untrusted data in Symfony
- Severity
- 7.1 / 10
- High · CVSS 3.0
- Exploit chance (EPSS)
- 2.26%
- Chance of exploitation in the next 30 days. Higher than 82.97% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-502 Deserialization of Untrusted Data
- Fix
- Available
- 5 packages have a fixed version
Description
In Symfony before 2.8.50, 3.x before 3.4.26, 4.x before 4.1.12, and 4.2.x before 4.2.7, it is possible to cache objects that may contain bad user input. On serialization or unserialization, this could result in the deletion of files that the current user has access to. This is related to symfony/cache and symfony/phpunit-bridge.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| symfony/cache | >= 3.1.0, < 3.4.26 |
3.4.26 |
| symfony/cache | >= 4.0.0, < 4.1.12 |
4.1.12 |
| symfony/cache | >= 4.2.0, < 4.2.7 |
4.2.7 |
| symfony/phpunit-bridge | >= 2.8.0, < 2.8.50 |
2.8.50 |
| symfony/phpunit-bridge | >= 3.0.0, < 3.4.26 |
3.4.26 |
| symfony/phpunit-bridge | >= 4.0.0, < 4.1.12 |
4.1.12 |
| symfony/phpunit-bridge | >= 4.2.0, < 4.2.7 |
4.2.7 |
| symfony/symfony | >= 2.8.0, < 2.8.50 |
2.8.50 |
| symfony/symfony | >= 3.0.0, < 3.4.26 |
3.4.26 |
| symfony/symfony | >= 4.0.0, < 4.1.12 |
4.1.12 |
| symfony/symfony | >= 4.2.0, < 4.2.7 |
4.2.7 |
| typo3/cms | >= 9.0.0, < 9.5.8 |
9.5.8 |
| typo3/cms-core | >= 9.0.0, < 9.5.8 |
9.5.8 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
symfony/cache Packagist → 3.4.26
- composer
composer require symfony/cache:^3.4.26
symfony/phpunit-bridge Packagist → 2.8.50
- composer
composer require symfony/phpunit-bridge:^2.8.50
symfony/symfony Packagist → 2.8.50
- composer
composer require symfony/symfony:^2.8.50
typo3/cms Packagist → 9.5.8
- composer
composer require typo3/cms:^9.5.8
typo3/cms-core Packagist → 9.5.8
- composer
composer require typo3/cms-core:^9.5.8
Severity breakdown
CVSS 3.0 7.1
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- High
- Availability
- None
Weakness
CWE-502: Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
How to prevent it
- Architecture and Design, Implementation: If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- Implementation: When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
- Implementation: Explicitly define a final object() to prevent deserialization.
- Architecture and Design, Implementation: Make fields transient to protect them from deserialization. An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.
- Implementation: Avoid having unnecessary types or gadgets (a sequence of instances and method invocations that can self-execute during the deserialization process, often found in libraries) available that can be leveraged for malicious ends. This limits the potential for unintended or unauthorized types and gadgets to be leveraged by the attacker. Add only acceptable classes to an allowlist. Note: new gadgets are constantly being discovered, so this alone is not a sufficient mitigation.
- Architecture and Design, Implementation: Employ cryptography of the data or code for protection. However, it's important to note that it would still be client-side security. This is risky because if the client is compromised then the security implemented on the client (the cryptography) can be bypassed.
- Operation: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
References
Advisories
Other links
- github.com/symfony/symfony/commit/4fb975281634b8d49ebf013af9e502e67c28816b
- debian.org/security/2019/dsa-4441
- typo3.org/security/advisory/typo3-core-sa-2019-016
- symfony.com/cve-2019-10912
- symfony.com/blog/cve-2019-10912-prevent-destructors-with-side-effects-from-being…
- seclists.org/bugtraq/2019/May/21
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZLOZX…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RTJGZ…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MDSM5…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LFARA…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BHHIG…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BAC2T…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6QEAO…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/42UEK…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZLO…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RTJ…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MDS…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LFA…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BHH…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BAC…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QE…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/42U…
- github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms/CVE-2019-1091…
- github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms-core/CVE-2019…
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-201…
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/phpunit-bridge/…
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/cache/CVE-2019-…
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-2v3c-qxhr-7vpv Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process | High | Also affects symfony/symfony |
| GHSA-r925-mgvr-h9cc Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header | High | Also affects symfony/symfony |
| GHSA-68jx-f42c-7599 TYPO3 CMS - Broken Access Control in Backend and Install Tool | High | Also affects typo3/cms-core |
| GHSA-h5x3-xfc9-m39h Symfony: UrlGenerator Dot-Segment Encoding Skips Every Other Chained `../` or `./` → Generated URL Collapses Off-Route Under RFC 3986 Normalization | Medium | Also affects symfony/symfony |
| GHSA-v3wm-qf9p-c549 Symfony: HtmlSanitizer URL Parser Deny Gates Underinclusive: Percent-Encoded BiDi Marks and Unicode Whitespace Bypass Visual-Spoofing Defense | Medium | Also affects symfony/symfony |
| GHSA-rrj9-5q2j-4gvr Symfony: Mailomat Mailer Webhook Parser Reads the HMAC Algorithm from the Request: Signature Algorithm Downgrade | Medium | Also affects symfony/symfony |
| GHSA-38cx-cq6f-5755 Symfony: IpUtils::PRIVATE_SUBNETS Omits IPv6 Transition Forms (6to4, NAT64, Teredo, IPv4-compatible): SSRF Bypass in NoPrivateNetworkHttpClient | High | Also affects symfony/symfony |
| GHSA-6h46-9jf5-q59x Symfony: Security Firewall Bypass via failure_forward Subrequest: Unauthenticated Access to access_control-Protected GET Routes | High | Also affects symfony/symfony |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor