Skip to content

Commit 5290ded

Browse files
committed
v. 4.44.4
* Correção: melhoria na segurança. Um administrador poderia modificar algumas queries de forma arbitrária. CVE-2025-10142 Merge branch 'release/4.44.4'
2 parents 06c56f9 + 5fafae7 commit 5290ded

File tree

5 files changed

+26
-14
lines changed

5 files changed

+26
-14
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ricardomartins/pagbank-woocommerce",
33
"description": "Integração PagBank (PagSeguro) WooCommerce com desconto nas taxas oficiais",
44
"type": "wordpress-plugin",
5-
"version": "4.44.3",
5+
"version": "4.44.4",
66
"license": "GPL-3.0",
77
"autoload": {
88
"psr-4": {

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Donate link: https://github.com/sponsors/r-martins
55
Requires at least: 4.0
66
Tested up to: 6.8
77
Requires PHP: 7.4
8-
Stable tag: 4.44.3
8+
Stable tag: 4.44.4
99
License: GPLv3
1010
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1111
PagBank com PIX, Cartão de Crédito, Boleto, Recorrência + Envio Fácil e com Menos Taxas no PagSeguro.
@@ -211,6 +211,9 @@ Você deve fazer isso através de Pull Requests ao [repositório oficial no gith
211211

212212
== Changelog ==
213213

214+
= 4.44.4 =
215+
* Correção: melhoria na segurança. Um administrador poderia modificar algumas queries de forma arbitrária. CVE-2025-10142
216+
214217
= 4.44.3 =
215218
* Compliance: adicionado Plugin URI nos headers do plugin e atualização de screenshots.
216219

rm-pagbank.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Plugin Name: PagBank Connect
1212
* Plugin URI: https://pbintegracoes.com
1313
* Description: Integra seu WooCommerce com as APIs PagSeguro v4 através da aplicação de Ricardo Martins (com descontos nas taxas oficiais), com suporte a PIX transparente e muito mais.
14-
* Version: 4.44.3
14+
* Version: 4.44.4
1515
* Requires at least: 5.2
1616
* Tested up to: 6.8
1717
* Requires PHP: 7.4
@@ -33,7 +33,7 @@
3333
defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
3434

3535
// Plugin constants.
36-
define( 'WC_PAGSEGURO_CONNECT_VERSION', '4.44.3' );
36+
define( 'WC_PAGSEGURO_CONNECT_VERSION', '4.44.4' );
3737
define( 'WC_PAGSEGURO_CONNECT_PLUGIN_FILE', __FILE__ );
3838
define( 'WC_PAGSEGURO_CONNECT_BASE_DIR', __DIR__ );
3939
define( 'WC_PAGSEGURO_CONNECT_TEMPLATES_DIR', WC_PAGSEGURO_CONNECT_BASE_DIR . '/src/templates/' );

src/Connect/Recurring/Admin/Subscriptions/SubscriptionList.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ public function prepare_items()
9090
$orderby = wp_unslash($orderby);
9191
$order = (isset($_GET['order']) && in_array($_GET['order'], array('asc', 'desc'))) ? $_GET['order'] : 'desc'; //phpcs:ignore WordPress.Security.NonceVerification
9292

93+
global $wpdb;
9394
$where = "1=1";
9495
if (!empty($_REQUEST['status'])) {
9596
$status = sanitize_text_field(wp_unslash($_REQUEST['status']));
96-
$where .= " AND status = '$status'";
97+
$where .= $wpdb->prepare(" AND status = %s", $status);
9798
}
9899
if (!empty($_REQUEST['order_id'])) {
99100
$order_id = intval($_REQUEST['order_id']);
100-
$where .= " AND initial_order_id = $order_id";
101+
$where .= $wpdb->prepare(" AND initial_order_id = %d", $order_id);
101102
}
102103

103104

src/Connect/Recurring/RecurringDashboard.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,26 @@ public function getMySubscriptions(): array
2828
return $order->get_id();
2929
}, $orders);
3030

31-
$ids_string_placeholders = implode(', ', array_fill(0, count($ids), '%d'));
32-
3331
global $wpdb;
34-
//select from pagbank_recurring where initial order is one of those
32+
33+
// If no orders, return empty array
34+
if (empty($ids)) {
35+
return [];
36+
}
37+
38+
// Create placeholders for each ID
39+
$placeholders = array_fill(0, count($ids), '%d');
40+
$format = implode(',', $placeholders);
41+
42+
// Prepare and execute the query safely
3543
$table = $wpdb->prefix . 'pagbank_recurring';
36-
$subscriptions = $wpdb->get_results(
37-
$wpdb->prepare(
38-
"SELECT * FROM `$table` WHERE initial_order_id IN ( $ids_string_placeholders ) ORDER BY id DESC",
39-
$ids
40-
)
44+
$query = $wpdb->prepare(
45+
"SELECT * FROM `$table` WHERE initial_order_id IN ($format) ORDER BY id DESC",
46+
$ids
4147
);
4248

49+
$subscriptions = $wpdb->get_results($query);
50+
4351
if ( ! empty($subscriptions))
4452
{
4553
return $subscriptions;

0 commit comments

Comments
 (0)