Skip to main content

Threat Intelligence Database

Comprehensive database of the latest cyber threats affecting organizations worldwide. Filter and search to find specific threat intelligence relevant to your organization.

Pro Console Lifetime

Stop chasing alerts. Route them.

Start free, then upgrade once to turn Radar into an automated delivery engine for your security stack.

Custom feeds / Automations: email, Slack, webhooks, SIEM/MISP / API access (baseline limits)

View Plans & Pricing

API access activates after upgrading in Console -> Billing.

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now

Filter Threats

Narrow down the results by type, severity, or affected countries

Search threats by title, CVE ID, or description. Maximum 100 characters.
Active filters (1):Package: pkg:cargo/github/abdolence/slack-morphism-rust

Threat Intelligence

Click on any threat for detailed analysis and mitigation recommendations

### Summary Slack Morphism exposes the correct Slack request HMAC when signature verification fails. For an invalid request, `slack-morphism` computes the correct signature for the attacker-controlled timestamp and request body and stores it in `SlackEventWrongSignatureError.generated_hash`. The error's `Debug` and `Display` representations expose that value, and the default Axum listener error handler logs it at error level. An attacker who can both reach the application's Slack callback endpoint and read its application/service logs can therefore use the verifier as a chosen-message HMAC oracle. The attacker can send an arbitrary request with an invalid signature, recover the correct signature from the resulting log entry, and resend the same request within the five-minute freshness window. The second request passes Slack Morphism's signature verification and reaches the protected application callback without the attacker knowing the Slack signing secret. I reproduced this end-to-end against both the Axum and Hyper integrations in `slack-morphism` 2.26.0 and 2.27.0. ### Details The vulnerability is in Slack Morphism's request signature verification error path. In `src/signature_verifier.rs`, `SlackEventSignatureVerifier::verify` computes the expected signature before comparing it with the untrusted `X-Slack-Signature` supplied by the request. On a mismatch, the implementation creates a `SlackEventWrongSignatureError` containing the complete correct signature in its public `generated_hash` field. Relevant source path: ```text src/signature_verifier.rs:46-59 ``` The error type is defined around: ```text src/signature_verifier.rs:182-199 ``` `generated_hash` is a public `String`; the type derives `Debug`, and its `Display` implementation also prints the generated signature. The resulting source-to-sink path is: 1. `SlackEventSignatureVerifier::verify` computes the expected HMAC for the attacker-controlled timestamp and raw request body. 2. Signature verification fails because the attacker initially sends an invalid signature. 3. Slack Morphism places the correct expected value in `SlackEventWrongSignatureError.generated_hash`. 4. The error's `Debug` and `Display` representations reveal that HMAC. 5. The Axum middleware propagates/formats the error through `src/axum_support/slack_events_middleware.rs`. 6. The default listener error handler in `src/listener.rs` logs the error at error level. 7. The attacker reads the generated HMAC from the logs. 8. The attacker resends the identical timestamp and body using the disclosed value as `X-Slack-Signature`. 9. Slack Morphism accepts the request and executes the protected callback. The Hyper path is also affected. `src/hyper_tokio/hyper_ext.rs` propagates the verifier error as a service error, and formatting that error similarly exposes the generated signature. The disclosed value is exactly the credential required to authenticate the corresponding request: ```text v0=hex(HMAC-SHA256(signing_secret, "v0:" || timestamp || ":" || raw_body)) ``` There is no weakness in HMAC-SHA256 or the constant-time comparison itself. The vulnerability is that the expected authentication value is disclosed through the verifier's error path. #### Affected versions I reproduced the vulnerability against: - `slack-morphism` 2.26.0 - `slack-morphism` 2.27.0 - current `master` at audit time: `e3b3ecabf99dfcf6c3548a42fba89fbfa510d21c` Git history indicates that the public `generated_hash` field was introduced in: ```text 9bf623bd51c6a9ef0cd22d842cc707a3311f1f22 ``` and appears to have existed since v0.10.0. Since versions before 2.26.0 are unsupported and were not dynamically tested during this assessment, I am reporting the independently validated supported range as: ```text >= 2.26.0, <= 2.27.0 ``` No patched release is currently available. ### PoC The PoC uses only localhost and a synthetic signing secret. Tested environment: ```text slack-morphism = 2.27.0 Rust 1.98.1 Linux x86_64 Axum and Hyper integrations ``` Synthetic signing secret: ```text SLACK_MORPHISM_SYNTHETIC_SIGNING_SECRET_7c91 ``` Start a Slack Morphism Axum callback endpoint using the normal Slack request signature verification middleware and the default listener error handling. Send a request using: ```text Body: {"type":"attacker_chosen","action":"transfer"} X-Slack-Request-Timestamp: <current Unix timestamp> X-Slack-Signature: v0=0000000000000000000000000000000000000000000000000000000000000000 ``` The all-zero signature is deliberately invalid. #### First request The first request is correctly rejected with HTTP 400. However, Slack Morphism's default error output contains an entry equivalent to: ```text SlackEventWrongSignatureError { ... generated_hash: "v0=<correct-HMAC>" } ``` where `<correct-HMAC>` is the valid Slack request signature for the exact attacker-controlled timestamp and body. Copy that `generated_hash`. Before the five-minute timestamp window expire

Join the discussion

Showing 1 to 1 of 1 result

Filters:Package: pkg:cargo/github/abdolence/slack-morphism-rust
Page 1 of 1
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses