{"id":"CVE-2022-41894","aliases":["CVE-2022-41894","GHSA-h6q3-vv32-2cq5","BIT-TENSORFLOW-2022-41894","PYSEC-2026-936"],"related":[],"kind":"vulnerability","state":"published","title":"Buffer overflow in `CONV_3D_TRANSPOSE` on TFLite","summary":"TensorFlow is an open source platform for machine learning. The reference kernel of the `CONV_3D_TRANSPOSE` TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result. Instead of `data_ptr += num_channels;` it should be `data_ptr += output_num_channels;` as if the number of input channels is different than the number of output channels, the wrong result will be returned and a buffer overflow will occur if num_channels > output_num_channels. An attacker can craft a model with a specific number of input channels. It is then possible to write specific values through the bias of the layer outside the bounds of the buffer. This attack only works if the reference kernel resolver is used in the interpreter. We have patched the issue in GitHub commit 72c0bdcb25305b0b36842d746cc61d72658d2941. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"TensorFlow is an open source platform for machine learning. The reference kernel of the `CONV_3D_TRANSPOSE` TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result. Instead of `data_ptr += num_channels;` it should be `data_ptr += output_num_channels;` as if the number of input channels is different than the number of output channels, the wrong result will be returned and a buffer overflow will occur if num_channels > output_num_channels. An attacker can craft a model with a specific number of input channels. It is then possible to write specific values through the bias of the layer outside the bounds of the buffer. This attack only works if the reference kernel resolver is used in the interpreter. We have patched the issue in GitHub commit 72c0bdcb25305b0b36842d746cc61d72658d2941. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe reference kernel of the [`CONV_3D_TRANSPOSE`](https://github.com/tensorflow/tensorflow/blob/091e63f0ea33def7ecad661a5ac01dcafbafa90b/tensorflow/lite/kernels/internal/reference/conv3d_transpose.h#L121) TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result.\n\nInstead of `data_ptr += num_channels;` it should be `data_ptr += output_num_channels;` as if the number of input channels is different than the number of output channels, the wrong result will be returned and a buffer overflow will occur if num_channels > output_num_channels.\n\nAn attacker can craft a model with a specific number of input channels in a way similar to the attached example script. It is then possible to write specific values through the bias of the layer outside the bounds of the buffer. This attack only works if the reference kernel resolver is used in the interpreter (i.e. `experimental_op_resolver_type=tf.lite.experimental.OpResolverType.BUILTIN_REF` is used).\n```python\nimport tensorflow as tf\nmodel = tf.keras.Sequential(\n    [\n        tf.keras.layers.InputLayer(input_shape=(2, 2, 2, 1024), batch_size=1),\n        tf.keras.layers.Conv3DTranspose(\n            filters=8,\n            kernel_size=(2, 2, 2),\n            padding=\"same\",\n            data_format=\"channels_last\",\n        ),\n    ]\n)\n\nconverter = tf.lite.TFLiteConverter.from_keras_model(model)\ntflite_model = converter.convert()\n\ninterpreter = tf.lite.Interpreter(\n    model_content=tflite_model,\n    experimental_op_resolver_type=tf.lite.experimental.OpResolverType.BUILTIN_REF,\n)\n\ninterpreter.allocate_tensors()\ninterpreter.set_tensor(\n    interpreter.get_input_details()[0][\"index\"], tf.zeros(shape=[1, 2, 2, 2, 1024])\n)\ninterpreter.invoke()\n```\n\n### Patches\nWe have patched the issue in GitHub commit [72c0bdcb25305b0b36842d746cc61d72658d2941](https://github.com/tensorflow/tensorflow/commit/72c0bdcb25305b0b36842d746cc61d72658d2941).\n\nThe fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.\n\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n\n### Attribution\nThis vulnerability has been reported by Thibaut Goetghebuer-Planchon, Arm Ltd.","format":"markdown","source":"ghsa"},{"lang":"es","text":"TensorFlow es una plataforma de código abierto para aprendizaje automático. El núcleo de referencia del operador `CONV_3D_TRANSPOSE` de TensorFlow Lite incrementa erróneamente data_ptr al agregar el sesgo al resultado. En lugar de `data_ptr += num_channels;` debería ser `data_ptr += output_num_channels;` ya que si el número de canales de entrada es diferente al número de canales de salida, se devolverá un resultado incorrecto y se producirá un desbordamiento del búfer si num_channels &gt; output_num_channels. Un atacante puede crear un modelo con un número específico de canales de entrada. Entonces es posible escribir valores específicos a través del sesgo de la capa fuera de los límites del búfer. Este ataque solo funciona si se utiliza el solucionador del núcleo de referencia en el intérprete. Hemos solucionado el problema en el compromiso de GitHub 72c0bdcb25305b0b36842d746cc61d72658d2941. La solución se incluirá en TensorFlow 2.11. También seleccionaremos este commit en TensorFlow 2.10.1, 2.9.3 y TensorFlow 2.8.4, ya que estos también se ven afectados y aún se encuentran en el rango admitido.","source":"nvd"}],"published":"2022-11-18T00:00:00.000Z","modified":"2026-09-08T08:48:20.621Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.1,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"version":">= 2.10.0, < 2.10.1","status":"affected"},{"version":">= 2.9.0, < 2.9.3","status":"affected"},{"version":"< 2.8.4","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.8.4"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.3"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.10.0","status":"affected","fixed":"2.10.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.8.4"},{"status":"affected","introduced":"2.9.0","fixed":"2.9.3"},{"status":"affected","introduced":"2.10.0","fixed":"2.10.1"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.8.4"},{"type":"ecosystem","introduced":"2.9.0","status":"affected","fixed":"2.9.3"},{"type":"ecosystem","introduced":"2.10.0","status":"affected","fixed":"2.10.1"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.8.4"},{"type":"semver","introduced":"2.9.0","status":"affected","fixed":"2.9.3"},{"type":"semver","introduced":"2.10.0","status":"affected","fixed":"2.10.1"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-h6q3-vv32-2cq5","tags":["advisory","exploit","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/72c0bdcb25305b0b36842d746cc61d72658d2941","tags":["advisory","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/blob/091e63f0ea33def7ecad661a5ac01dcafbafa90b/tensorflow/lite/kernels/internal/reference/conv3d_transpose.h#L121","tags":["advisory","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41894","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/tensorflow","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-h6q3-vv32-2cq5","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-22T15:40:39.752Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-41894","url":"https://www.cve.org/CVERecord?id=CVE-2022-41894","licence":"CVE Terms of Use","modified":"2025-04-22T16:04:55.192Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h6q3-vv32-2cq5","url":"https://github.com/advisories/GHSA-h6q3-vv32-2cq5","licence":"CC-BY-4.0","modified":"2026-07-07T11:56:23.405Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-41894","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41894","licence":"Public domain","modified":"2026-06-17T05:04:00.723Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-936","url":"https://osv.dev/vulnerability/PYSEC-2026-936","licence":"CC-BY-4.0","modified":"2026-07-07T11:56:23.405Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2022-41894","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2022-41894","licence":"Apache-2.0","modified":"2026-09-08T08:48:20.621Z"}],"updatedAt":"2026-11-25T22:58:16.635Z","epss":{"score":0.00761,"percentile":0.56529,"date":"2026-12-01T12:00:22.000Z"}}