data/reports: add GO-2023-2385.yaml

Aliases: CVE-2023-26154, GHSA-5844-q3fc-56rh

Fixes golang/vulndb#2385

Change-Id: Idd5da87f080a8fe71a23627fb8f7bb370dd0c613
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/551915
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/data/osv/GO-2023-2385.json b/data/osv/GO-2023-2385.json
new file mode 100644
index 0000000..8138078
--- /dev/null
+++ b/data/osv/GO-2023-2385.json
@@ -0,0 +1,211 @@
+{
+  "schema_version": "1.3.1",
+  "id": "GO-2023-2385",
+  "modified": "0001-01-01T00:00:00Z",
+  "published": "0001-01-01T00:00:00Z",
+  "aliases": [
+    "CVE-2023-26154",
+    "GHSA-5844-q3fc-56rh"
+  ],
+  "summary": "Insufficient entropy in AES-256-CBC in github.com/pubnub/go",
+  "details": "There is insufficient entropy in the implementation of the AES-256-CBC cryptographic algorithm. The provided encrypt functions are less secure when hex encoding and trimming are applied, leaving half of the bits in the key always the same for every encoded message or file.\n\nUsers are encouraged to migrate to the new crypto package introduced in v7.2.0.",
+  "affected": [
+    {
+      "package": {
+        "name": "github.com/pubnub/go",
+        "ecosystem": "Go"
+      },
+      "ranges": [
+        {
+          "type": "SEMVER",
+          "events": [
+            {
+              "introduced": "0"
+            }
+          ]
+        }
+      ],
+      "ecosystem_specific": {
+        "imports": [
+          {
+            "path": "github.com/pubnub/go/utils",
+            "symbols": [
+              "DecryptFile",
+              "DecryptString",
+              "EncryptCipherKey",
+              "EncryptFile",
+              "EncryptString",
+              "SerializeAndEncrypt",
+              "SerializeEncryptAndSerialize",
+              "aesCipher",
+              "generateIV",
+              "padWithPKCS7",
+              "unpadPKCS7"
+            ]
+          }
+        ]
+      }
+    },
+    {
+      "package": {
+        "name": "github.com/pubnub/go/v5",
+        "ecosystem": "Go"
+      },
+      "ranges": [
+        {
+          "type": "SEMVER",
+          "events": [
+            {
+              "introduced": "0"
+            }
+          ]
+        }
+      ],
+      "ecosystem_specific": {
+        "imports": [
+          {
+            "path": "github.com/pubnub/go/v5/utils",
+            "symbols": [
+              "DecryptFile",
+              "DecryptString",
+              "EncryptCipherKey",
+              "EncryptFile",
+              "EncryptString",
+              "SerializeAndEncrypt",
+              "SerializeEncryptAndSerialize",
+              "aesCipher",
+              "generateIV",
+              "padWithPKCS7",
+              "unpadPKCS7"
+            ]
+          }
+        ]
+      }
+    },
+    {
+      "package": {
+        "name": "github.com/pubnub/go/v6",
+        "ecosystem": "Go"
+      },
+      "ranges": [
+        {
+          "type": "SEMVER",
+          "events": [
+            {
+              "introduced": "0"
+            }
+          ]
+        }
+      ],
+      "ecosystem_specific": {
+        "imports": [
+          {
+            "path": "github.com/pubnub/go/v6/utils",
+            "symbols": [
+              "DecryptFile",
+              "DecryptString",
+              "EncryptCipherKey",
+              "EncryptFile",
+              "EncryptString",
+              "SerializeAndEncrypt",
+              "SerializeEncryptAndSerialize",
+              "aesCipher",
+              "generateIV",
+              "padWithPKCS7",
+              "unpadPKCS7"
+            ]
+          }
+        ]
+      }
+    },
+    {
+      "package": {
+        "name": "github.com/pubnub/go/v7",
+        "ecosystem": "Go"
+      },
+      "ranges": [
+        {
+          "type": "SEMVER",
+          "events": [
+            {
+              "introduced": "0"
+            }
+          ]
+        }
+      ],
+      "ecosystem_specific": {
+        "imports": [
+          {
+            "path": "github.com/pubnub/go/v7/utils",
+            "symbols": [
+              "DecryptFile",
+              "DecryptString",
+              "EncryptCipherKey",
+              "EncryptFile",
+              "EncryptString",
+              "SerializeAndEncrypt",
+              "SerializeEncryptAndSerialize",
+              "aesCipher",
+              "generateIV",
+              "padWithPKCS7",
+              "unpadPKCS7"
+            ]
+          }
+        ]
+      }
+    },
+    {
+      "package": {
+        "name": "github.com/pubnub/go/v7",
+        "ecosystem": "Go"
+      },
+      "ranges": [
+        {
+          "type": "SEMVER",
+          "events": [
+            {
+              "introduced": "7.2.0"
+            }
+          ]
+        }
+      ],
+      "ecosystem_specific": {
+        "imports": [
+          {
+            "path": "github.com/pubnub/go/v7/crypto",
+            "symbols": [
+              "EncryptCipherKey",
+              "NewAesCbcCryptoModule",
+              "NewLegacyCryptoModule",
+              "NewLegacyCryptor",
+              "defaultExtendedCryptor.DecryptStream",
+              "defaultExtendedCryptor.EncryptStream",
+              "legacyAesCipher",
+              "legacyCryptor.Decrypt",
+              "legacyCryptor.DecryptStream",
+              "legacyCryptor.Encrypt",
+              "legacyCryptor.EncryptStream",
+              "module.Decrypt",
+              "module.DecryptStream",
+              "module.Encrypt",
+              "module.EncryptStream"
+            ]
+          }
+        ]
+      }
+    }
+  ],
+  "references": [
+    {
+      "type": "ADVISORY",
+      "url": "https://github.com/advisories/GHSA-5844-q3fc-56rh"
+    },
+    {
+      "type": "FIX",
+      "url": "https://github.com/pubnub/go/commit/428517fef5b901db7275d9f5a75eda89a4c28e08"
+    }
+  ],
+  "database_specific": {
+    "url": "https://pkg.go.dev/vuln/GO-2023-2385"
+  }
+}
\ No newline at end of file
diff --git a/data/reports/GO-2023-2385.yaml b/data/reports/GO-2023-2385.yaml
new file mode 100644
index 0000000..a8549dd
--- /dev/null
+++ b/data/reports/GO-2023-2385.yaml
@@ -0,0 +1,120 @@
+id: GO-2023-2385
+modules:
+    - module: github.com/pubnub/go
+      vulnerable_at: 4.10.0+incompatible
+      packages:
+        - package: github.com/pubnub/go/utils
+          symbols:
+            - EncryptString
+            - DecryptString
+            - EncryptFile
+            - DecryptFile
+            - generateIV
+            - unpadPKCS7
+            - padWithPKCS7
+            - EncryptCipherKey
+            - aesCipher
+          derived_symbols:
+            - SerializeAndEncrypt
+            - SerializeEncryptAndSerialize
+          excluded_symbols:
+            - TestComplexClassDecryption
+            - TestComplexClassEncryption
+    - module: github.com/pubnub/go/v5
+      vulnerable_at: 5.0.3
+      packages:
+        - package: github.com/pubnub/go/v5/utils
+          symbols:
+            - EncryptString
+            - DecryptString
+            - EncryptFile
+            - DecryptFile
+            - generateIV
+            - unpadPKCS7
+            - padWithPKCS7
+            - EncryptCipherKey
+            - aesCipher
+          derived_symbols:
+            - SerializeAndEncrypt
+            - SerializeEncryptAndSerialize
+          excluded_symbols:
+            - TestComplexClassDecryption
+            - TestComplexClassEncryption
+    - module: github.com/pubnub/go/v6
+      vulnerable_at: 6.1.0
+      packages:
+        - package: github.com/pubnub/go/v6/utils
+          symbols:
+            - EncryptString
+            - DecryptString
+            - EncryptFile
+            - DecryptFile
+            - generateIV
+            - unpadPKCS7
+            - padWithPKCS7
+            - EncryptCipherKey
+            - aesCipher
+          derived_symbols:
+            - SerializeAndEncrypt
+            - SerializeEncryptAndSerialize
+          excluded_symbols:
+            - TestComplexClassDecryption
+            - TestComplexClassEncryption
+    - module: github.com/pubnub/go/v7
+      vulnerable_at: 7.1.2
+      packages:
+        - package: github.com/pubnub/go/v7/utils
+          symbols:
+            - EncryptString
+            - DecryptString
+            - EncryptFile
+            - DecryptFile
+            - generateIV
+            - unpadPKCS7
+            - padWithPKCS7
+            - EncryptCipherKey
+            - aesCipher
+          derived_symbols:
+            - SerializeAndEncrypt
+            - SerializeEncryptAndSerialize
+          excluded_symbols:
+            - TestComplexClassDecryption
+            - TestComplexClassEncryption
+    - module: github.com/pubnub/go/v7
+      versions:
+        - introduced: 7.2.0
+      vulnerable_at: 7.2.0
+      packages:
+        - package: github.com/pubnub/go/v7/crypto
+          symbols:
+            - NewLegacyCryptor
+            - legacyCryptor.Encrypt
+            - legacyCryptor.Decrypt
+            - legacyCryptor.EncryptStream
+            - legacyCryptor.DecryptStream
+            - EncryptCipherKey
+            - legacyAesCipher
+          derived_symbols:
+            - NewAesCbcCryptoModule
+            - NewLegacyCryptoModule
+            - defaultExtendedCryptor.DecryptStream
+            - defaultExtendedCryptor.EncryptStream
+            - module.Decrypt
+            - module.DecryptStream
+            - module.Encrypt
+            - module.EncryptStream
+summary: Insufficient entropy in AES-256-CBC in github.com/pubnub/go
+description: |-
+    There is insufficient entropy in the implementation of the AES-256-CBC
+    cryptographic algorithm. The provided encrypt functions are less secure when hex
+    encoding and trimming are applied, leaving half of the bits in the key always
+    the same for every encoded message or file.
+
+    Users are encouraged to migrate to the new crypto package introduced in v7.2.0.
+cves:
+    - CVE-2023-26154
+ghsas:
+    - GHSA-5844-q3fc-56rh
+references:
+    - advisory: https://github.com/advisories/GHSA-5844-q3fc-56rh
+    - fix: https://github.com/pubnub/go/commit/428517fef5b901db7275d9f5a75eda89a4c28e08