WooCommerce Square <= 5.1.1 - Unauthenticated Insecure Direct Object Reference to Sensitive Information Exposure in get_token_by_id
Affected versions: [4.2.0, 4.2.3); [4.3.0, 4.3.2); [4.4.0, 4.4.2); [4.5.0, 4.5.2); [4.6.0, 4.6.4); [4.7.0, 4.7.4); [4.8.0, 4.8.8); [4.9.0, 4.9.9)
Vulnerability type: CWE-639 Authorization Bypass Through User-Controlled Key
Affected software, patched versions and attribution
The WooCommerce Square plugin for WordPress is vulnerable to Insecure Direct Object Reference in all versions up to, and including, 5.1.1 via the get_token_by_id function due to missing validation on a user controlled key. This makes it possible for unauthenticated attackers to expose arbitrary Square "ccof" (credit card on file) values and leverage this value to potentially make fraudulent charges on the target site.
WooCommerce Square
Affected versions: [4.2.0, 4.2.3); [4.3.0, 4.3.2); [4.4.0, 4.4.2); [4.5.0, 4.5.2); [4.6.0, 4.6.4); [4.7.0, 4.7.4); [4.8.0, 4.8.8); [4.9.0, 4.9.9); [5.0.0, 5.0.1); [5.1.0, 5.1.2)
Patched versions: 4.2.3, 4.3.2, 4.4.2, 4.5.2, 4.6.4, 4.7.4, 4.8.8, 4.9.9, 5.0.1, 5.1.2
Researcher credit: DityaRA
Applicable copyright and licence notices
This record contains material that is subject to copyright
Copyright 2012-2026 Defiant Inc.
Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy.
This record contains material that is subject to copyright
Copyright 1999-2026 The MITRE Corporation
CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE®). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.
- Published
- January 9, 2026
- CVSS
- 7.5