Operational Defect Database

BugZero found this defect 33 days ago.

MongoDB | 2643900

Properly validate `sortBy` when parsing $setWindowFields

Last update date:

4/16/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

We don't sufficiently validate `sortBy` during parsing with all window functions. Example queries that hit tassert: Expression in `sortBy` (location 5429410): $setWindowFields: { sortBy: {a: {$meta: "randVal"}}, output: {b: {$max: 5, window: {range: [+3, 'unbounded']}}} } Descending sort (location 5429404): $setWindowFields: { sortBy: {a: -1}, output: {b: {$max: 5, window: {range: [+3, 'unbounded']}}} }

Top User Comments


Steps to Reproduce

See description

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Open

Learn More

Search:

...