Placement of User into Incorrect Group Affecting api-platform/core package, versions >=2.7.0, <2.7.10>=3.0.0, <3.0.12>=3.1.0, <3.1.3


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Not Defined
EPSS
0.07% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-APIPLATFORMCORE-3336165
  • published1 Mar 2023
  • disclosed28 Feb 2023
  • creditToflar, soyuka

Introduced: 28 Feb 2023

CVE-2023-25575  (opens in a new tab)
CWE-842  (opens in a new tab)

How to fix?

Upgrade api-platform/core to version 2.7.10, 3.0.12, 3.1.3 or higher.

Overview

api-platform/core is a builds a fully-featured hypermedia or GraphQL API in minutes.

Affected versions of this package are vulnerable to Placement of User into Incorrect Group such that resource properties secured with the security option of the ApiPlatform\Metadata\ApiProperty attribute can be disclosed to unauthorized users. The problem affects most serialization formats, including raw JSON, which is enabled by default when installing API Platform. Custom serialization formats may also be impacted.

Note: Only collection endpoints are affected by the issue, item endpoints are not. The JSON-LD format is not affected by the issue.

The result of the security rule is only executed for the first item of the collection. The result of the rule is then cached and reused for the next items. This bug can leak data to unauthorized users when the rule depends on the value of a property of the item. This bug can also hide properties that should be displayed to authorized users.

Workaround

Users who are unable to upgrade to the fixed version should replace the cache_key of the context array of the Serializer inside a custom normalizer that works on objects if the security option of the ApiPlatform\Metadata\ApiProperty attribute is used.

CVSS Scores

version 3.1