Pleroma Security Release: 2.11.0

Pleroma 2.11.0 is a security release. It fixes these issues:

Update immediately.

WARNING: Because of dependency requirements, this release changes the supported Erlang/OTP and Elixir versions. The new requirements are:

If the packages of your distribution do not meet these requirements, read Installing newer versions of Elixir and Erlang.

If you use the OTP release and your operating system is too old for it, you can run the release in a container. Read Running OTP releases via Docker (glibc shim).

If you send logs to an error tracker

Before this release, a request to /socket/websocket with a malformed token parameter crashed in Plug.Crypto.verify/4, and the crash report contained the secret key base. Shout is enabled by default. The request alone does not give the key to the attacker, but everyone who can read your logs or your error tracker (for example Sentry) can see it.

Search your logs for Plug.Crypto.verify. If you find crash reports, change secret_key_base in your configuration. This logs out all users.

Upgrade notes

From source only

  1. Get new dependencies and recompile Pleroma:

    MIX_ENV=prod mix deps.get
    MIX_ENV=prod mix compile
    

Everyone

  1. Run database migrations (inside Pleroma directory):
    • OTP: ./bin/pleroma_ctl migrate
    • From Source: mix ecto.migrate
  2. Restart Pleroma

This release has these new migrations:

20200602125217_add_group_key_to_notifications.exs
20220624104914_create_webhooks.exs
20221029171353_add_internal_to_webhooks.exs
20260623000000_add_emoji_to_lists.exs
20260725000000_add_activity_favorites_lookup_index.exs

Notable changes

Gun is the default HTTP client

Gun support is revamped and now works with HTTP and SOCKSv5 proxies. Because of the Hackney 4 issues below, Pleroma now uses Gun as the default HTTP client. To use Hackney instead, add this to prod.secret.exs:

config :tesla, adapter: Tesla.Adapter.Hackney

If you see new problems with outgoing requests after the update, please report them.

Hackney 4

This release moves to Hackney 4. Hackney 4 has worse support for proxies and pools connections per host. For example, chunked HTTP requests through a proxy open a new connection for each chunk. If media loads slowly or fails, increase the timeouts. The new pooling also uses more memory.

Pleroma makes Hackney use HTTP/1.1 only. With Hackney, size limits for fetched responses (for example for link previews) are checked only after Hackney has read the whole response. Gun stops reading at the limit.

Certificate trust

Hackney, Gun, Finch, Mua and the Swoosh HTTP mail adapters now trust only the CAStore bundle that comes with Pleroma. If your instance connects to a server with a certificate from a private CA (for example an internal S3 or SMTP server), give the CA explicitly:

Custom scrubbers

If you have custom HTML scrubbers, replace FastSanitize.Sanitizer.Meta.allow_tag_with_uri_attributes with Pleroma.HTML.URIAttributes.allow_tag_with_uri_attributes (add require Pleroma.HTML.URIAttributes). The new macro checks the link scheme the way browsers read it.

Elixir 1.19 support

This release fixes several issues with Pleroma on Elixir 1.19 and Erlang/OTP 28. One of them is the missing list of available MRFs in AdminFE.

Pleroma now also uses the new Elixir syntax for its default Logger configuration. If your configuration uses the old syntax, Pleroma applies it at startup and shows one or both of these deprecation warnings:

!!!DEPRECATION WARNING!!!
Your configuration is using deprecated syntax for configuring backends of Elixir's logger.
`config :logger, backends: [...]` is deprecated syntax due to changes in Elixir.
Please update your configuration at your earliest convenience to use:
  `config :pleroma, :logger, backends: [...]`

Note: `:console` is no longer considered a backend and is used by default, you can disable it using:
  `config :logger, :default_handler: false`

!!!DEPRECATION WARNING!!!
Your configuration is using deprecated syntax for configuring logging to console.
`config :logger, :console` is deprecated syntax due to changes in Elixir.
Please update your configuration at your earliest convenience to use
  `config :logger, default_handler` and `config :logger, :default_formatter`.

Note: `:default_handler` is used only for the `level` setting. All other configurations go under
`:default_formatter`. For more info visit: https://hexdocs.pm/logger/Logger.html#module-backends-and-backwards-compatibility

AdminFE

AdminFE can be installed again. Pleroma now downloads the builds from the package registry instead of GitLab job artifacts. For the current stable AdminFE, use --ref stable:

./bin/pleroma_ctl frontend install admin-fe --ref stable

Pleroma-FE

Pleroma 2.11.0 bundles Pleroma-FE 2.11.4 with these notable changes:

Changelog

Security

Changed

Added

Fixed

— phnt, lain