Repository navigation
9.12.1
RESTHeart 9.12.1
This is a security release. It fixes how RESTHeart sends emails on behalf of requests, and how it fills email templates. If you use
restheart-accounts or the emails plugin, upgrade. Read "Before you upgrade" first: some changes alter existing behaviour.
Before you upgrade
- You set per-request SMTP overrides (
override-emails-*). They now apply only when the request carries a complete SMTP server:
smtp-hostname,smtp-usernameandsmtp-password. A partial override is ignored as a whole, and the email goes out with the static
configuration. - You register an
EmailGate. restheart-accounts emails (sign-up verification, password reset, invitations) now pass through it. If the
gate throws, emails sent on behalf of a request are no longer sent. - Your email templates receive HTML through
{{variables}}. Variable values are now HTML-escaped in the body. HTML passed in a variable
shows as text. - You run the Docker images with volumes or a custom
securityContext. The images now run as the non-root user with UID 65532.
Security: emails sent on behalf of requests
Partial SMTP overrides no longer reuse the static credentials
Per-request overrides were merged with the static emails configuration field by field. A request that set only some fields still sent through
the deployment's own SMTP server and credentials. Setting only the sender address or name changed the From of an email sent with the deployment's
account. Setting only the hostname sent the deployment's username and password to that host. Any override also counted as "own sender" for the
EmailGate, so the gate did not count those emails.
Now an override applies only with its own hostname, username and password. It never inherits the static server or credentials. The EmailGate is
told ownSender only in that case.
restheart-accounts emails pass through the EmailGate
The sign-up, password-reset, invitation and resend-invitation emails were sent without the request. A registered EmailGate could not tell which
service sent them and treated them as the deployment's own emails. Per-request SMTP overrides did not apply to them either.
These emails now carry the request, so the gate counts them and per-request SMTP overrides apply.
The EmailGate fails closed for request emails
When the gate threw an exception, the email was sent anyway. Now an email sent on behalf of a request through the deployment's own server is not
sent if the gate fails. Emails with no request, such as the deployment's own notices, and emails sent through the requester's own SMTP server
still go out.
Template variables are escaped
EmailRenderer inserted variable values into the template as they were. A value such as a first name typed into a sign-up form could add links
or markup to the email.
Now:
- In the body, values are HTML-escaped. URLs keep working: a browser reads
&in anhrefas&. - In the subject, values keep their text but lose line breaks and control characters, so they cannot add email headers.
- Placeholders are replaced in one pass, so a value that contains
{{other}}is not expanded.
Docker images run as non-root (#768)
Both images now run as UID 65532 (nonroot). The JVM image takes it from its distroless base, and the native image adds a user with the same
UID. Files in the image stay owned by root and readable by everyone, so any UID can run RESTHeart (for example, the arbitrary UID that OpenShift
assigns).
- If you mount volumes that RESTHeart writes to, make them writable by UID 65532 or by your chosen UID.
- The GraalVM polyglot resource cache now goes to
/tmp/graalvm-cache. - Helm chart:
runAsUserandfsGroupare now65532, and anemptyDiris mounted on/tmp, because the root filesystem is read-only.
Other changes
- A request body larger than
MAX_ENTITY_SIZEorMULTIPART_MAX_ENTITY_SIZEis now answered with 413 instead of 500. Chunked bodies are not
covered: Undertow closes the connection first. bruteForceAttackGuard: the alarm names the instance by/core/name, and the log line carries the request'sHost.@rnd()and the generated JWT key use one sharedSecureRandom. The workers watchdog writes thread dumps to a private temporary directory.- Dependencies: jackson-databind 2.21.8, Apache Tika 3.3.3, native-maven-plugin 1.1.16.
- js-plugin example: moment 2.31.0 (CVE-2026-17495, Dependabot #42).
Full Changelog: 9.12.0...9.12.1