VDB
Sign up
MEDIUM6.5

GHSA-6gvq-jcmp-8959

ALTCHA Proof-of-Work Vulnerable to Challenge Splicing and Replay

Quick fix

GHSA-6gvq-jcmp-8959 — altcha-lib: upgrade to the fixed version with the command below.

npm install altcha-lib@1.4.1

Details

### Impact

A cryptographic semantic binding flaw in ALTCHA libraries allows challenge payload splicing, which may enable replay attacks. The HMAC signature does not unambiguously bind challenge parameters to the nonce, allowing an attacker to reinterpret a valid proof-of-work submission with a modified expiration value. This may allow previously solved challenges to be reused beyond their intended lifetime, depending on server-side replay handling and deployment assumptions.

The vulnerability primarily impacts abuse-prevention mechanisms such as rate limiting and bot mitigation. It does not directly affect data confidentiality or integrity.

### Patches

This issue has been addressed by enforcing explicit semantic separation between challenge parameters and the nonce during HMAC computation.

Users are advised to upgrade to patched versions.

### Workarounds

As a mitigation, implementations may append a delimiter to the end of the `salt` value prior to HMAC computation (for example, `<salt>?expires=<time>&`). This prevents ambiguity between parameters and the nonce and is backward-compatible with existing implementations, as the delimiter is treated as a standard URL parameter separator.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/altcha-lib
Introduced in: 0Fixed in: 1.4.1
Fixnpm install altcha-lib@1.4.1
Packagist/altcha-org/altcha
Introduced in: 0Fixed in: 1.3.1
Fixcomposer require altcha-org/altcha:^1.3.1
Go/github.com/altcha-org/altcha-lib-go
Introduced in: 0Fixed in: 1.0.0
Fixgo get github.com/altcha-org/altcha-lib-go@v1.0.0
Maven/org.altcha:altcha
Introduced in: 0Fixed in: 1.3.0
Fix# pom.xml: bump <version>1.3.0</version> for org.altcha:altcha
RubyGems/altcha
Introduced in: 0Fixed in: 1.0.0
Fixbundle update altcha
PyPI/altcha
Introduced in: 0Fixed in: 1.0.0
Fixpip install --upgrade 'altcha>=1.0.0'
Hex/altcha
Introduced in: 0Fixed in: 1.0.0
Fixmix deps.update altcha

References