CVE-2026-42180: Lemmy api common Lemmy Has SSRF Vulnerability

MODERATE
Advisory Identifier: GHSA-3jvj-v6w2-h948
CVSS 6.3
CWE-918
Published
Advisory Summary

CVE-2026-42180 is a MODERATE (CVSS 6.3) lemmy has ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Lemmy api common libraries in the crates.io ecosystem. The issue involves lemmy has ssrf in /api/v3/post via webmention dispatch. Remediation is available by upgrading affected packages to version 0.19.18.

CVE-2026-42180 at a Glance

CVE Identifier CVE-2026-42180
GHSA Identifier GHSA-3jvj-v6w2-h948
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Lemmy api common
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 6.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-42180

To remediate this vulnerability, upgrade all affected Lemmy api common dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

lemmy_api_common fixed: 0.19.18
Upgrade lemmy_api_common to 0.19.18
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for lemmy_api_common

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42180, inspect your project dependencies for Lemmy api common:

inspect dependencies for lemmy_api_common

Analyze the terminal output to locate any version of Lemmy api common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.19.18), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Lemmy api common, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Lemmy allows an authenticated low-privileged user to create a link post through `POST /api/v3/post`. When a post is created in a public community, the backend asynchronously sends a Webmention to the attacker-controlled link target. The submitted URL is checked for syntax and scheme, but the audited code path does not reject loopback, private, or link-local destinations before the Webmention request is issued. This lets a normal user trigger server-side HTTP requests toward internal services. ### Details The entry point is the normal post creation API. The user-controlled `url` field is accepted, normalized with `diesel_url_create()`, and only validated with `is_valid_url()`. That validation allows `http` and `https` but does not implement internal address rejection. The post creation flow then schedules Webmention delivery for public communities. This creates a direct source-to-sink path from an externally supplied post URL to a server-side outbound HTTP request. Core vulnerable code path: ```rust // crates/api_crud/src/post/create.rs let url = diesel_url_create(data.url.as_deref())?; if let Some(url) = &url { is_url_blocked(url, &url_blocklist)?; is_valid_url(url)?; } ``` ```rust // crates/utils/src/utils/validation.rs pub fn is_valid_url(url: &Url) -> LemmyResult<()> { let is_valid = ["http", "https", "magnet"].contains(&url.scheme()); if !is_valid { Err(LemmyErrorType::InvalidUrl)? } Ok(()) } ``` ```rust // crates/api_crud/src/post/create.rs if community.visibility == CommunityVisibility::Public { let post = inserted_post.clone(); let url = url.clone(); spawn_try_task(async move { if let Some(url) = url { Webmention::new(post.ap_id.clone().into(), url.into()).send().await?; } Ok(()) }); } ``` These snippets matter because they show that the attacker controls `CreatePost.url`, the only validation is scheme-level, and the resulting URL is later used for server-side Webmention delivery. ### PoC _Complete instructions, including specific configuration details, to reproduce the vulnerability._Prerequisites: - The attacker has a valid low-privileged account. - The attacker can post to a public community. Practical reproduction flow: 1. Run an HTTP listener on an internal or loopback-reachable address from the Lemmy server's perspective, such as `127.0.0.1:8081`. 2. Authenticate as a normal user. 3. Submit a post to a public community with `url` set to the internal target. 4. Observe the Lemmy API return a normal post creation response. 5. Observe the internal HTTP listener receive a request from the Lemmy server shortly afterwards. Complete PoC: ```http POST /api/v3/post HTTP/1.1 Host: victim.example Authorization: Bearer <low-priv-jwt> Content-Type: application/json { "name": "wm-ssrf", "community_id": 1, "url": "http://127.0.0.1:8081/", "body": null, "alt_text": null, "honeypot": null, "nsfw": false, "language_id": null, "custom_thumbnail": null } ``` Outcome: - The API returns a successful `post_view` response. - The Lemmy server later issues an outbound request toward `http://127.0.0.1:8081/` as part of Webmention processing. ### Impact An authenticated user can use the application server as a blind SSRF primitive against internal HTTP services. This can expose internal network reachability, trigger internal webhooks or administrative endpoints, and expand the attack surface beyond the public deployment boundary. Because the sink is reached after ordinary user content submission, the issue is practical to exploit in real deployments where normal users can post to public communities.

CVE-2026-42180 Affected Lemmy api common Versions

1 component(s)
Fixed Versions:
0.19.18
Product / Package Ecosystem Affected Versions Fixed Version
lemmy_api_common
crates.io
< 0.19.18
0.19.18

References

Frequently Asked Questions

What is CVE-2026-42180?
CVE-2026-42180 is a security vulnerability in Lemmy api common involving Lemmy has SSRF in /api/v3/post via Webmention dispatch under CWE-918: Server-Side Request Forgery (SSRF).
Which Lemmy api common versions are affected?
Affected versions include releases prior to 0.19.18 across affected packages: lemmy_api_common.
What version fixes CVE-2026-42180?
Upgrading to 0.19.18 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lemmy_api_common affected?
Yes, lemmy_api_common is affected in releases prior to 0.19.18. Upgrade your dependency to 0.19.18 or later.
What is the CVSS score of CVE-2026-42180?
CVE-2026-42180 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-42180?
CVE-2026-42180 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check crates.io dependencies for CVE-2026-42180?
Run the dependency tree command: 'inspect dependencies for lemmy_api_common'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3jvj-v6w2-h948",
  "modified" : "2026-05-13T13:34:08Z",
  "published" : "2026-04-24T15:22:49Z",
  "aliases" : [ "CVE-2026-42180" ],
  "summary" : "Lemmy has SSRF in /api/v3/post via Webmention dispatch",
  "details" : "### Summary\nLemmy allows an authenticated low-privileged user to create a link post through `POST /api/v3/post`. When a post is created in a public community, the backend asynchronously sends a Webmention to the attacker-controlled link target.\n\nThe submitted URL is checked for syntax and scheme, but the audited code path does not reject loopback, private, or link-local destinations before the Webmention request is issued. This lets a normal user trigger server-side HTTP requests toward internal services.\n\n### Details\nThe entry point is the normal post creation API. The user-controlled `url` field is accepted, normalized with `diesel_url_create()`, and only validated with `is_valid_url()`. That validation allows `http` and `https` but does not implement internal address rejection.\n\nThe post creation flow then schedules Webmention delivery for public communities. This creates a direct source-to-sink path from an externally supplied post URL to a server-side outbound HTTP request.\n\nCore vulnerable code path:\n\n```rust\n// crates/api_crud/src/post/create.rs\nlet url = diesel_url_create(data.url.as_deref())?;\nif let Some(url) = &url {\n  is_url_blocked(url, &url_blocklist)?;\n  is_valid_url(url)?;\n}\n```\n\n```rust\n// crates/utils/src/utils/validation.rs\npub fn is_valid_url(url: &Url) -> LemmyResult<()> {\n  let is_valid = [\"http\", \"https\", \"magnet\"].contains(&url.scheme());\n  if !is_valid {\n    Err(LemmyErrorType::InvalidUrl)?\n  }\n  Ok(())\n}\n```\n\n```rust\n// crates/api_crud/src/post/create.rs\nif community.visibility == CommunityVisibility::Public {\n  let post = inserted_post.clone();\n  let url = url.clone();\n  spawn_try_task(async move {\n    if let Some(url) = url {\n      Webmention::new(post.ap_id.clone().into(), url.into()).send().await?;\n    }\n    Ok(())\n  });\n}\n```\n\nThese snippets matter because they show that the attacker controls `CreatePost.url`, the only validation is scheme-level, and the resulting URL is later used for server-side Webmention delivery.\n\n### PoC\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._Prerequisites:\n\n- The attacker has a valid low-privileged account.\n- The attacker can post to a public community.\n\nPractical reproduction flow:\n\n1. Run an HTTP listener on an internal or loopback-reachable address from the Lemmy server's perspective, such as `127.0.0.1:8081`.\n2. Authenticate as a normal user.\n3. Submit a post to a public community with `url` set to the internal target.\n4. Observe the Lemmy API return a normal post creation response.\n5. Observe the internal HTTP listener receive a request from the Lemmy server shortly afterwards.\n\nComplete PoC:\n\n```http\nPOST /api/v3/post HTTP/1.1\nHost: victim.example\nAuthorization: Bearer <low-priv-jwt>\nContent-Type: application/json\n\n{\n  \"name\": \"wm-ssrf\",\n  \"community_id\": 1,\n  \"url\": \"http://127.0.0.1:8081/\",\n  \"body\": null,\n  \"alt_text\": null,\n  \"honeypot\": null,\n  \"nsfw\": false,\n  \"language_id\": null,\n  \"custom_thumbnail\": null\n}\n```\n\nOutcome:\n\n- The API returns a successful `post_view` response.\n- The Lemmy server later issues an outbound request toward `http://127.0.0.1:8081/` as part of Webmention processing.\n### Impact\nAn authenticated user can use the application server as a blind SSRF primitive against internal HTTP services. This can expose internal network reachability, trigger internal webhooks or administrative endpoints, and expand the attack surface beyond the public deployment boundary.\n\nBecause the sink is reached after ordinary user content submission, the issue is practical to exploit in real deployments where normal users can post to public communities.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "lemmy_api_common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.19.18"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/LemmyNet/lemmy/security/advisories/GHSA-3jvj-v6w2-h948"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42180"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/LemmyNet/lemmy/commit/1f06693b708020c5c3a3752bd2f1c6006a75e9bc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/LemmyNet/lemmy"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/LemmyNet/lemmy/releases/tag/0.19.18"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-24T15:22:49Z",
    "nvd_published_at" : "2026-05-08T20:16:31Z"
  }
}