Your message dated Sat, 14 Nov 2026 22:47:06 +0000
with message-id <[email protected]>
and subject line Bug#1150302: fixed in mongo-c-driver 1.30.4-1+deb13u4
has caused the Debian Bug report #1150302,
regarding mongo-c-driver: CVE-2026-81524 backport (0009) swaps db/ns arguments
of _mongoc_aggregate; mongoc_collection_aggregate() always fails
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1150302: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1150302
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:mongo-c-driver
Version: 1.30.4-1+deb13u3
Severity: grave
Tags: security patch
X-Debbugs-Cc: [email protected]
Dear Maintainer,
debian/patches/0009_CVE-2026-81524.patch (the backport of upstream
CDRIVER-6424, "validate db and collection names") breaks
mongoc_collection_aggregate() for every collection. It always returns a
cursor in the error state:
database name "<db>.<collection>" invalid: contains "."
== Cause ==
The patch adds a "db" parameter to _mongoc_aggregate(), but declares it in a
different position than it defines it.
mongoc-aggregate-private.h (declaration):
_mongoc_aggregate (mongoc_client_t *client,
const char *ns,
const char *db,
mongoc_query_flags_t flags, ...
mongoc-aggregate.c (definition):
_mongoc_aggregate (mongoc_client_t *client,
const char *db,
const char *ns,
mongoc_query_flags_t flags, ...
The callers follow the declaration, for example in mongoc-collection.c:
return _mongoc_aggregate (collection->client,
collection->ns,
collection->db,
flags, ...
Inside the function, "db" therefore holds collection->ns ("mydb.mycoll") and
"ns" holds collection->db. The new check
if (!_mongoc_cursor_check_db_name(cursor, db))
rejects the joined namespace because it contains ".".
Upstream 2.5.1 has the parameters in the same order in the declaration and
the definition (ns, db), so it is not affected. mongoc_database_aggregate()
passes db->name for both arguments, so it works by accident.
== Reproducer ==
#include <mongoc/mongoc.h> /* <mongoc.h> on 1.x */
#include <stdio.h>
int main(void) {
bson_error_t e; mongoc_init();
mongoc_client_t *c = mongoc_client_new("mongodb://127.0.0.1:27017/");
mongoc_collection_t *col = mongoc_client_get_collection(c, "testdb",
"coll");
bson_t *p = bson_new(); /* empty pipeline */
mongoc_cursor_t *cur = mongoc_collection_aggregate(col,
MONGOC_QUERY_NONE, p, NULL, NULL);
const bson_t *d;
while (mongoc_cursor_next(cur, &d)) {}
if (mongoc_cursor_error(cur, &e)) printf("error: %s\n", e.message);
return 0;
}
Expected: no error.
Actual: error: database name "testdb.coll" invalid: contains "."
(The error is set at cursor creation, before any server I/O, so it also
reproduces without a reachable server.)
== Impact ==
Any application that uses mongoc_collection_aggregate() cannot read from
MongoDB with this package. Discovered through the mongo_fdw foreign data
wrapper, whose reads all use aggregate, so its regression tests failed.
== Suggested fix ==
Make the definition match the declaration, in
src/libmongoc/src/mongoc/mongoc-aggregate.c:
-_mongoc_aggregate (mongoc_client_t *client,
- const char *db,
- const char *ns,
+_mongoc_aggregate (mongoc_client_t *client,
+ const char *ns,
+ const char *db,
Please also add a regression test that runs mongoc_collection_aggregate()
on a collection.
Regards,
--
*Jeevan Chalke*
*Senior Principal Engineer, Engineering Manager*
*Product Development*
enterprisedb.com <https://www.enterprisedb.com>
--- End Message ---
--- Begin Message ---
Source: mongo-c-driver
Source-Version: 1.30.4-1+deb13u4
Done: Roberto C. Sanchez <[email protected]>
We believe that the bug you reported is fixed in the latest version of
mongo-c-driver, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Roberto C. Sanchez <[email protected]> (supplier of updated mongo-c-driver
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 09 Oct 2026 21:12:28 -0400
Source: mongo-c-driver
Architecture: source
Version: 1.30.4-1+deb13u4
Distribution: trixie
Urgency: medium
Maintainer: Mongo C Driver Team <[email protected]>
Changed-By: Roberto C. Sanchez <[email protected]>
Closes: 1150302
Changes:
mongo-c-driver (1.30.4-1+deb13u4) trixie; urgency=medium
.
* Follow up to fix CVE-2026-81524: correct parameter ordering in function
definition. Thanks to Jeevan Chalke for the patch. (Closes: #1150302)
Checksums-Sha1:
3be207e2d62a9682e3b8238d52b9fbbc85b4c2a7 2734
mongo-c-driver_1.30.4-1+deb13u4.dsc
97797e3b911d48386a8a87e7895f6357b11159dc 30236
mongo-c-driver_1.30.4-1+deb13u4.debian.tar.xz
575e01432c7e5865035d38ffa353ea95108efe0b 7188
mongo-c-driver_1.30.4-1+deb13u4_source.buildinfo
Checksums-Sha256:
7cf8c2b2d1d14dcab2f3634c38ed9934e840a9ad769bb5a534faf57ca00fdd51 2734
mongo-c-driver_1.30.4-1+deb13u4.dsc
a89067e97d85ed4d5cf93f35cae077547dd2c9ea3dd538cc23964c6638eedde1 30236
mongo-c-driver_1.30.4-1+deb13u4.debian.tar.xz
5ec55404a9b9e5eb54a22e20cb6994ffac27f3b346bd6bfc391386fab8c7134d 7188
mongo-c-driver_1.30.4-1+deb13u4_source.buildinfo
Files:
86220ecf690999db9d98872e342da063 2734 libs optional
mongo-c-driver_1.30.4-1+deb13u4.dsc
df2f58de8ad2e3a7f66bf826261248fa 30236 libs optional
mongo-c-driver_1.30.4-1+deb13u4.debian.tar.xz
b0588f33a6c90fa8c8188c2f33749284 7188 libs optional
mongo-c-driver_1.30.4-1+deb13u4_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEIYZ1DR4ae5UL01q7ldFmTdL1kUIFAmrJlvYACgkQldFmTdL1
kUJNYw/8C8+dkEJmrWTBisbsfFAtEir1WMh79QRfIeWHQzw0smSNJ9dZaYqTxd56
TjbKu6nzWng+6fqaNNODKeItmroGZXpEsQCrce0e0Hqt/3QBusswhqlWET9o+QgW
xnf0KExfk+ZY5qjAQyg2CZS7ykg0/3VHvlfpUs+SFmOtUo5tbTHE/yKGw+dkVSqN
lNeEDGjSrZ/DQYCHS/6vkZz7S251+IP2wm7JU8fzQetKHX2lnwyNz3FOxFqZnd0A
pIGVA85He6in5W31E2DXpAhHXUB7mttwgWKs4qK0k1bydzQNakSz8cEM+D8SNJsX
SWzEFsb1yJQ7Zm0APDdrft9z6BcXvoPsTqtOhzIBrJMe7ljd6JOVoY1l+tdI6Mgi
EV13f2+RzAxejuq0pdcuBn816eTXJf62iEheJcq/E5wryh0KqN/FlsFZSCKNyrQj
8XzJPCkzKp6GlbYVZKfAFe5Qs79F0OS/I6Mig3ma9UEwqZX8e88LBG/Qu1ODnm2g
hOD4tx8VHC8H2DVrItyUX+G7e426dI9h+UwkbV0bYFyID4aPO5DMHsLFu4vZF27u
hp85DKcqXpJERu1udYHUN04vbZrXFfITAickMrodqPBINU1AAZ3Ab6P0G7PhlK0g
CQsOKSwHmc5JUsnT1YQdQhwiyOOXf4ZDHqqiXHmLfYoYzYYLGUY=
=poiK
-----END PGP SIGNATURE-----
pgpkRjzLVa68w.pgp
Description: PGP signature
--- End Message ---