Fix aggregation pipeline updateLookup with dollar-prefixed fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.13, 8.3.9, 7.0.41, 8.0.30, 9.0.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • v9.0, v8.3, v8.2, v8.0, v7.0
    • QE 2026-07-20, QE 2026-08-03, QE 2026-08-17, QE 2026-08-31, QE 2026-09-15
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When using the aggregation pipeline version of updateLookup in change streams, the lookup will inject the document's _id and shard key values into a $match expression, without escaping any potential dollar-prefixed fields.
      This allows arbitrary MQL operators to be executed as part of the updateLookup, and can turn the updateLookup from a point lookup into a multi-document lookup.

      The document key that is used for the updateLookup needs to be escaped properly so that it can be used safely inside a $match expression.

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: