GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-wmx7-pw49-88jxmedium4.8

Craft CMS Allows TOTP Token To Stay Valid After Use

Check your stack

The advisory, in context

Craft CMS 5 allows reuse of TOTP tokens multiple times within the validity period.

Impact

An attacker is able to re-submit a valid TOTP token to establish an authenticated session. This requires that the attacker has knowledge of the victim's credentials.

A TOTP token can be used multiple times to establish an authenticated session. RFC 6238 insists that an OTP must not be used more than once.

The verifier MUST NOT accept the second attempt of the OTP after the successful validation has been issued for the first OTP, which ensures one-time only use of an OTP.

The OWASP Application Security Verification Standard v4.0.3 (ASVS) reiterates this property with requirement 2.8.4.

Verify that time-based OTP can be used only once within the validity period.

It should also be noted that the validity period of an TOTP token is 2 minutes. This makes a successful brute force attack more likely, since the four tokens are valid at the same time.

Patches

This has been patched in Craft 5.2.3.

References:

https://github.com/sbaresearch/advisories/tree/public/2024/SBA-ADV 2024061701_CraftCMS_TOTP_Valid_After_Use

https://github.com/craftcms/cms/releases/tag/5.2.3

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

craftcms/cms Packagist
Ecosystem versions

From 5.0.0-beta.1 before 5.2.3

Fixed in 5.2.3

39 explicitly affected versions

5.0.0, 5.0.0-RC1, 5.0.0-beta.1, 5.0.0-beta.10, 5.0.0-beta.11, 5.0.0-beta.2, 5.0.0-beta.3, 5.0.0-beta.4, 5.0.0-beta.5, 5.0.0-beta.6, 5.0.0-beta.7, 5.0.0-beta.8, 5.0.0-beta.9, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.1.0, 5.1.1, 5.1.10, 5.1.2, 5.1.3, 5.1.4, 5.1.5, 5.1.6, 5.1.7, 5.1.8, 5.1.9, 5.2.0, 5.2.0-beta.1, 5.2.0-beta.2, 5.2.0-beta.3, 5.2.0-beta.4, 5.2.0-beta.5, 5.2.0-beta.6, 5.2.1, 5.2.2

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "5.0.0-beta.1"
        },
        {
          "fixed": "5.2.3"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "5.0.0",
    "5.0.0-RC1",
    "5.0.0-beta.1",
    "5.0.0-beta.10",
    "5.0.0-beta.11",
    "5.0.0-beta.2",
    "5.0.0-beta.3",
    "5.0.0-beta.4",
    "5.0.0-beta.5",
    "5.0.0-beta.6",
    "5.0.0-beta.7",
    "5.0.0-beta.8",
    "5.0.0-beta.9",
    "5.0.1",
    "5.0.2",
    "5.0.3",
    "5.0.4",
    "5.0.5",
    "5.0.6",
    "5.1.0",
    "5.1.1",
    "5.1.10",
    "5.1.2",
    "5.1.3",
    "5.1.4",
    "5.1.5",
    "5.1.6",
    "5.1.7",
    "5.1.8",
    "5.1.9",
    "5.2.0",
    "5.2.0-beta.1",
    "5.2.0-beta.2",
    "5.2.0-beta.3",
    "5.2.0-beta.4",
    "5.2.0-beta.5",
    "5.2.0-beta.6",
    "5.2.1",
    "5.2.2"
  ]
}

References