Common Weakness Enumeration

CWE-323

Weakness Allowed

Reusing a Nonce, Key Pair in Encryption

Abstraction: Base · Status: Incomplete

Nonces should be used for the present occasion and only once.

Mapping guidance

This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Relationships and members
ChildOf: CWE-344 · View CWE-1000
Modes of introduction
Architecture and Design

REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Detection methods

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Content history
Submission: CLASP · 2006-07-19 · CWE Draft 3
Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Time_of_Introduction

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Background_Details, Common_Consequences, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Relationships

Modification: CWE Content Team · MITRE · 2012-10-30 · CWE 2.3

updated Demonstrative_Examples, Potential_Mitigations

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Applicable_Platforms, Modes_of_Introduction, Relationships

Modification: CWE Content Team · MITRE · 2019-06-20 · CWE 3.3

updated Type

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated References

Modification: CWE Content Team · MITRE · 2021-10-28 · CWE 4.6

updated Relationships

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Relationships, Type

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Detection_Factors, Relationships, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-04-30 · CWE 4.20

updated Observed_Examples

94 vulnerabilities reference this CWE, most recent first.

GHSA-WP4M-7HPJ-8QP8

Vulnerability from github – Published: 2024-01-20 00:30 – Updated: 2025-12-02 00:28
Withdrawn 2025-12-02 VLAI
Summary
Duplicate Advisory: Discovery uses the same AES/GCM Nonce throughout the session
Details

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-w3hj-wr2q-x83g. This link is maintained to preserve external references.

Original Description

Consensys Discovery versions less than 0.4.5 uses the same AES/GCM nonce for the entire session. which should ideally be unique for every message. The node's private key isn't compromised, only the session key generated for specific peer communication is exposed.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "tech.pegasys.discovery:discovery"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-323",
      "CWE-330"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-12-02T00:28:45Z",
    "nvd_published_at": "2024-01-19T22:15:08Z",
    "severity": "MODERATE"
  },
  "details": "### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-w3hj-wr2q-x83g. This link is maintained to preserve external references.\n\n### Original Description\nConsensys Discovery versions less than 0.4.5 uses the same AES/GCM nonce for the entire session. which should ideally be unique for every message. The node\u0027s private key isn\u0027t compromised, only the session key generated for specific peer communication is exposed.",
  "id": "GHSA-wp4m-7hpj-8qp8",
  "modified": "2025-12-02T00:28:45Z",
  "published": "2024-01-20T00:30:27Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ConsenSys/discovery/security/advisories/GHSA-w3hj-wr2q-x83g"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23688"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-w3hj-wr2q-x83g"
    },
    {
      "type": "WEB",
      "url": "https://vulncheck.com/advisories/vc-advisory-GHSA-w3hj-wr2q-x83g"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Duplicate Advisory: Discovery uses the same AES/GCM Nonce throughout the session",
  "withdrawn": "2025-12-02T00:28:45Z"
}

GHSA-X5PQ-988F-JG83

Vulnerability from github – Published: 2026-11-17 21:32 – Updated: 2026-11-18 00:31
VLAI
Details

Nonce reuse in WebRTC in Google Chrome prior to 158.0.8127.36 allowed a remote attacker to potentially obtain sensitive information via a crafted HTML page. (Chromium security severity: Low)

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-130921"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-323"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-17T21:17:46Z",
    "severity": "MODERATE"
  },
  "details": "Nonce reuse in WebRTC in Google Chrome prior to 158.0.8127.36 allowed a remote attacker to potentially obtain sensitive information via a crafted HTML page. (Chromium security severity: Low)",
  "id": "GHSA-x5pq-988f-jg83",
  "modified": "2026-11-18T00:31:33Z",
  "published": "2026-11-17T21:32:07Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-130921"
    },
    {
      "type": "WEB",
      "url": "https://chromereleases.googleblog.com/2026/11/stable-channel-update-for-desktop_01699533288.html"
    },
    {
      "type": "WEB",
      "url": "https://issues.chromium.org/issues/513198336"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-X72P-G37Q-4XR9

Vulnerability from github – Published: 2024-07-22 09:31 – Updated: 2024-07-31 18:42
Withdrawn 2024-07-31 VLAI
Summary
Withdrawn: SFTPGo's JWT implmentation lacks certain security measures
Details

Withdrawn: The attack vector described in the backing report required that an attacker gain access to a user's session cookie. By gaining access to the session cookie the attacker is for all intents and purposes the valid user and any access to user data would be expected.

~In SFTPGo 2.6.2, the JWT implementation lacks certain security measures, such as using JWT ID (JTI) claims, nonces, and proper expiration and invalidation mechanisms.~

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/drakkan/sftpgo/v2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "2.6.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-40430"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-323",
      "CWE-639"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-07-22T18:46:59Z",
    "nvd_published_at": "2024-07-22T07:15:02Z",
    "severity": "MODERATE"
  },
  "details": "Withdrawn:\nThe attack vector described in the backing report required that an attacker gain access to a user\u0027s session cookie. By gaining access to the session cookie the attacker is for all intents and purposes the valid user and any access to user data would be expected.\n\n~In SFTPGo 2.6.2, the JWT implementation lacks certain security measures, such as using JWT ID (JTI) claims, nonces, and proper expiration and invalidation mechanisms.~",
  "id": "GHSA-x72p-g37q-4xr9",
  "modified": "2024-07-31T18:42:56Z",
  "published": "2024-07-22T09:31:55Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-40430"
    },
    {
      "type": "WEB",
      "url": "https://github.com/github/advisory-database/pull/4645"
    },
    {
      "type": "WEB",
      "url": "https://alexsecurity.rocks/posts/cve-2024-40430"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/drakkan/sftpgo"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Withdrawn: SFTPGo\u0027s JWT implmentation lacks certain security measures",
  "withdrawn": "2024-07-31T18:42:56Z"
}

GHSA-XR5H-PHRJ-8VXV

Vulnerability from github – Published: 2026-05-13 01:36 – Updated: 2026-05-14 20:38
VLAI
Summary
Astro: Server island encrypted parameters vulnerable to cross-component replay
Details

Impact

Astro versions prior to 6.1.10 used AES-GCM encryption to protect the confidentiality and integrity of server island props and slots parameters, but did not bind the ciphertext to its intended component or parameter type. An attacker could replay one component's encrypted props (p) value as another component's slots (s) value, or vice versa.

Since slots contain raw unescaped HTML while props may contain user-controlled values, this could lead to XSS in applications that meet all of the following conditions:

  • The application uses server islands
  • Two different server island components share the same key name for a prop and a slot
  • An attacker has full control over the value of the overlapping prop (requires a dynamically rendered page)

These conditions are very unlikely to occur in real-world production applications.

Patches

This has been patched in astro@6.1.10.

The fix binds each encrypted parameter to its target component and purpose using AES-GCM authenticated additional data (AAD). Each ciphertext now includes context like props:IslandName or slots:IslandName, so encrypted data for one component cannot be replayed against a different component, and encrypted props cannot be reused as slots.

References

  • Fix PR: https://github.com/withastro/astro/pull/16457
  • Example demonstrating the vulnerability: https://github.com/CyberSecurityAustria/ACSC2026-web-astronomical
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "astro"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "6.1.10"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-45028"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-323",
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-13T01:36:39Z",
    "nvd_published_at": "2026-05-13T16:17:00Z",
    "severity": "LOW"
  },
  "details": "### Impact\n\nAstro versions prior to 6.1.10 used AES-GCM encryption to protect the confidentiality and integrity of server island props and slots parameters, but did not bind the ciphertext to its intended component or parameter type. An attacker could replay one component\u0027s encrypted props (`p`) value as another component\u0027s slots (`s`) value, or vice versa.\n\nSince slots contain raw unescaped HTML while props may contain user-controlled values, this could lead to XSS in applications that meet **all** of the following conditions:\n\n- The application uses server islands\n- Two different server island components share the same key name for a prop and a slot\n- An attacker has full control over the value of the overlapping prop (requires a dynamically rendered page)\n\nThese conditions are very unlikely to occur in real-world production applications.\n\n### Patches\n\nThis has been patched in **astro@6.1.10**.\n\nThe fix binds each encrypted parameter to its target component and purpose using AES-GCM authenticated additional data (AAD). Each ciphertext now includes context like `props:IslandName` or `slots:IslandName`, so encrypted data for one component cannot be replayed against a different component, and encrypted props cannot be reused as slots.\n\n### References\n\n- Fix PR: https://github.com/withastro/astro/pull/16457\n- Example demonstrating the vulnerability: https://github.com/CyberSecurityAustria/ACSC2026-web-astronomical",
  "id": "GHSA-xr5h-phrj-8vxv",
  "modified": "2026-05-14T20:38:54Z",
  "published": "2026-05-13T01:36:39Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/withastro/astro/security/advisories/GHSA-xr5h-phrj-8vxv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-45028"
    },
    {
      "type": "WEB",
      "url": "https://github.com/withastro/astro/pull/16457"
    },
    {
      "type": "WEB",
      "url": "https://github.com/withastro/astro/commit/3d82220a1549e699e34ed433f3846a919f4c02bd"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/withastro/astro"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Astro: Server island encrypted parameters vulnerable to cross-component replay"
}

Mitigation
Implementation

Refuse to reuse nonce values.

Mitigation
Implementation

Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.

No CAPEC attack patterns related to this CWE.