Customer group names, segments, and promotional rule information exposed via GraphQL
This article provides a hotfix to prevent the exposure of customer group names, customer segments, and promotional rule information via GraphQL. The issue is scheduled to be fixed in Adobe Commerce 2.4.8-p1.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.8
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.8
Issue
For Storefront Personalization Drop-ins, new GraphQL mutations were introduced to display basic information like customer group names, segments, cart, and catalog rules. However, this can expose sensitive data such as offer details or coupon codes, if included in the names.
Steps to reproduce
Case I: Catalog Rule
-
On the Admin sidebar, go to Marketing > Catalog Price Rule > Add New Rule.
-
Define the rule conditions (for example, product attribute or category).
-
Save and apply the rule.
-
Ensure a product meets the rule conditions.
-
Run the following GraphQL query to fetch all the rules:
code language-none query { allCatalogRules { name } }
-
Query a product to verify if the rule applies:
code language-none query { products(filter: { sku: { eq: "product-sku" } }) { items { name rules { name } } } }
Case II: Cart Rule
-
On the Admin sidebar, go to Marketing > Cart Price Rule > Add New Rule.
-
Set conditions such as minimum cart value and customer group.
-
Save and apply the rule.
-
Add products to cart to trigger the rule.
-
Use GraphQL to verify all the cart rules:
code language-none query { allCartRules { name } }
-
Check if rules are applied to the active cart:
code language-none query { cart(cart_id: "your-cart-id") { rules { name } } }
Case III: Customer Group
-
On the Admin sidebar, go to Customers > Customer Groups.
-
Verify that the expected groups exist.
-
Use GraphQL to fetch all groups:
code language-none query { allCustomerGroups { name } }
-
Verify the customer/guest’s group:
code language-none query { customerGroup { name } }
Case IV: Customer Segment (for Adobe Commerce only)
-
On the Admin sidebar, go to Customers > Customer Segments → Add Segment.
-
Define customer-based conditions (for example, order, cart contents).
-
Assign applicable scope: Visitor, Registered, or both.
-
Ensure that the conditions match a test customer.
-
Use GraphQL to check all segments:
code language-none query { allCustomerSegments { name apply_to } }
-
Validate the segments applied to a cart:
code language-none query { customerSegments(cartId: "your-cart-id") { name } }
Expected result:
Names of customer groups, segments, and promotional rule information aren’t exposed through GraphQL.
Actual result:
Names of customer groups, segments, and promotional rule information are exposed through GraphQL.
Solution
Apply the attached patches depending on your Adobe Commerce version:
-
For Adobe Commerce version 2.4.8:
-
For Magento Open Source version 2.4.8: