Zero-Day
15 min read
March 11, 2026

How I Impersonated an Interia Administrator. An Analysis of an SPF Bypass / DMARC Misconfiguration

How I Impersonated an Interia Administrator. An Analysis of an SPF Bypass / DMARC Misconfiguration

In today’s world, email remains one of the most widely used communication channels, both for personal and professional purposes. Yet that very popularity also makes email a prime target for cybercriminals looking to exploit it for profit. One of the most common techniques for deceiving email recipients is SMTP spoofing — a tactic that lets attackers send messages that appear to come from a trusted source. This method enables phishing and fraud, making it hard for recipients to verify a message’s authenticity.

In this blog I responsibly disclose a flaw enabling SMTP spoofing, discovered in the popular Polish email service Interia.pl. I would like to shed light on the topic and raise awareness among the people responsible for these systems, so that the flaw can be effectively remediated.

I would like to sincerely thank the Interia team and CERT Polska for their cooperation in fixing the reported flaw.

TL;DR - Key takeaways

  • Analysis of the SPF Bypass / DMARC Misconfiguration
  • Envelope vs. Header
  • The Vulnerability: SPF Bypass
  • Where Is DMARC?

Analysis of the SPF Bypass / DMARC Misconfiguration

To understand why, in 2025, it is still possible to impersonate a large Polish mail provider or a bank, we have to go back to the 1980s. The SMTP protocol (Simple Mail Transfer Protocol), on which the entire global email system rests, was designed at a time when everyone on the internet trusted one another. It has no built-in mechanism for verifying the sender’s identity.

Modern protections are, to a large extent, "patches" laid over this old system. The biggest hole that attackers exploit stems from a fundamental distinction between two concepts in the structure of an email.

1. Envelope vs. Header

This is the crucial point where the manipulation happens. Every email consists of two addressing layers that do not have to match each other:

Envelope From (RFC 5321): This is the address on the "envelope." It is used by mail servers for routing (e.g. delivery errors come back to it). This is the address we supply in the SMTP MAIL FROM command.

Header From (RFC 5322): This is the address in the "letter" inside the envelope. This is the address the user sees in their Outlook, Gmail, or webmail in the "From:" field.

The Core Problem

These two addresses do not have to match — and that is precisely the source of the vulnerability. Mail servers verify the address on the envelope, but the user sees the address from the header.

2. The Vulnerability: SPF Bypass

Most administrators believe that deploying an SPF (Sender Policy Framework) record protects their domain. Unfortunately, SPF only checks the envelope address (Envelope From).

An attacker exploits this as follows (so-called SPF Misalignment):

What does the recipient’s server see? The server checks SPF for the envelope domain (attacker-domain.com). The IP address of the attacker’s server matches the SPF record of the attacker’s domain. Result: SPF PASS.

What does the victim see? The victim opens the email and sees the header: From: security@big-polish-provider.pl. Because SPF passed (for the technical domain), the email lands in the inbox rather than in spam.

  • The attacker sets up their own mail server and attaches a domain they control to it (e.g. attacker-domain.com).
  • In the DNS configuration for attacker-domain.com they set a valid SPF record authorizing their server to send.
  • As the Envelope From they set admin@attacker-domain.com.
  • As the Header From (what the victim sees) they set security@big-polish-provider.pl.

3. Where Is DMARC?

Here we get to the heart of the problem at many Polish providers. The DMARC protocol was created precisely to tie these two layers together. It enforces so-called Alignment: the domain in the "From" header must match the domain verified by SPF (or DKIM).

So why does the attack work?

Because DMARC is only effective when its policy is set to p=reject or p=quarantine.

# If the target domain has a DMARC record set to: v=DMARC1; p=none;

# ...then this means "monitoring mode." # The receiving server sees that the domains do not match # (attacker vs. provider), but per the domain owner’s # instruction (p=none) it passes the message through.

4. Attack Simulation (SMTP Flow)

If we looked "under the hood" and connected to the mail server via telnet/netcat, the attack would look like this:

# Connect to the Interia server telnet mail.interia.pl 25 # STEP 1: Introduce yourself (attacker uses their own domain) HELO attacker-domain.com # STEP 2: Envelope From (this is what SPF checks - and it will pass!) MAIL FROM: <admin@attacker-domain.com> # STEP 3: Recipient RCPT TO: <employee@interia.pl> # STEP 4: Message body (this is where the spoofing happens) DATA From: Technical Department <admin@interia.pl> To: <employee@interia.pl> Subject: Urgent terms-of-service update Date: Thu, 08 Jan 2026 12:00:00 +0100 Dear User, please click the link... .

In the example below, the Interia server queries DNS for the SPF record of attacker-domain.com. Everything will check out. If interia.pl has no strict DMARC, the mail client will show the employee a forged sender without any warnings.

Analysis Summary

The vulnerability does not stem from a software bug, but from a configuration and protocol-logic flaw. It is a classic example of technical debt, where the absence of a p=reject policy in the DMARC record at large providers opens the door to trivial impersonation of their domains.

Conclusions

Below is the original response from the Interia team dated 29 September 2024, summarizing the whole matter and reporting the changes made. It serves as an excellent summary of the entire blog post.

Information about the report and the start of work

On 30 April 2024, an independent researcher reported by email potential security flaws concerning the handling of the SMTP protocol and the DMARC policy in the Interia.pl mail service. The report was accepted for analysis, and work on assessment and developing appropriate fixes began in May 2024. The team responsible for the mail infrastructure, together with the security team, took action aimed at securing the reported areas while preserving functionality for users.

Reported issues

The independent researcher identified two potential security issues:

  • DMARC Policy is set to "none," which means there is no strict verification of the authenticity of email senders. This state of affairs may allow the sending of messages impersonating other email addresses, without the restrictions imposed by a more restrictive DMARC policy.
  • There is a possibility of email spoofing — impersonating other email addresses by manually altering the FROM header (RFC5322.From) when using the SMTP protocol. This issue may lead to malicious activity, such as sending messages suggesting they were sent by a different sender.

Fixes implemented

After a thorough analysis of the report and internal verification, the following changes were introduced to add extra safeguards in the reported areas:

  • The ability to impersonate other email addresses was blocked when using the SMTP protocol. Verification mechanisms were applied on the mail server side that prevent manual manipulation of the FROM header, thereby preventing spoofing.
  • Security was strengthened in the web mail client, blocking attempts to impersonate other email addresses. As a result, users of the webmail service can no longer attempt to impersonate other accounts, whether within the interia.pl domain and its subdomains or external email addresses.

In addition, work is underway on visual improvements that will make it easier for users to identify spoofing, phishing, and scam messages by presenting the envelope sender address to the user in the web panel. The planned rollout is scheduled for November.

Elements not implemented

Despite implementing many safeguards, the DMARC Policy remains set to "none." The decision to keep this setting stems from concern for our users. Implementing a more restrictive DMARC policy could result in the rejection of important messages in cases where recipients’ servers are misconfigured. CERT Polska likewise treats the "none" policy not as an error, but merely as a warning (https://bezpiecznapoczta.cert.pl/).

Summary

With regard to the report concerning the RFC5322.From header, which may lead to certain security implications, we want to emphasize that this was not a direct flaw in the Interia.pl mail service, but in the widely used, though sometimes controversial, internet message standard. The handling of these headers complied with the SMTP protocol and the RFCs and was required by all popular mail clients.

The team responsible for the mail infrastructure and the security team made every effort to eliminate the possibility of spoofing in Interia.pl mail, thereby providing a high level of protection for users against potential threats, while striving to maintain the greatest possible compliance with the RFC standards and the operating principles of commonly used mail protocols.

Official response from the Interia.pl team

Summary

The vulnerability does not stem from a software bug, but from a configuration and protocol-logic flaw. It is a classic example of technical debt, where the absence of a p=reject policy in the DMARC record at large providers opens the door to trivial impersonation of their domains. Cooperation with the Interia team and CERT Polska led to the deployment of fixes that protect users.

Timeline

2024
April 30Marcin Motwicki

First contact

The first message notifying the Interia.pl team of the possibility of spoofing the SMTP sender.

April 30Interia Team

Request for vulnerability details

A point of contact was designated for further correspondence.

April 30Marcin Motwicki

Report sent

A detailed report was sent allowing the vulnerability to be reproduced step by step.

May 5Marcin Motwicki

Responsible disclosure

A question about the Interia team’s approach to the responsible disclosure process.

May 7Interia Team

It's not a bug, it's a feature :)

Feedback received that, after a thorough analysis by the Interia team, the reported flaw was not deemed significant. Arguments and conclusions from the analysis were presented.

May 8Marcin Motwicki

I object!

Objection to the Interia team’s analysis and reaffirmation that the security flaw exists. Additional details were sent as a counterargument for the Interia team.

May 13Interia Team

Objection upheld

The security report was accepted again, with a statement of further analysis.

June 3Marcin Motwicki

Request for a status update

June 3Interia Team

"Implementation work is in progress"

August 1Marcin Motwicki

Vulnerability reported to CERT Polska

August 1CERT Polska

Confirmation of receipt

A statement that an attempt would be made to contact the Interia team.

August 7CERT Polska

They’ll fix it, they will

Information that the Interia team plans to roll out improvements by early September.

September 16Marcin Motwicki

Update, please

A request to CERT Polska for a status update. Information about the planned disclosure in the coming week.

September 16CERT Polska

Any minute now…

Contact with the Interia team. Information from the Interia team that fixes are still being rolled out. A request to postpone the responsible disclosure.

September 17Marcin Motwicki

Postponing!

Agreement to postpone the responsible disclosure until 1 November 2024.

September 18CERT Polska

Roger that, over

Confirmation of receipt and forwarding of the message to the Interia team.

September 29Interia Team

Changes, people, changes!

A summary of the whole matter. Information about the changes made by the Interia team.

September 30CERT Polska

Summary

A summary of the whole matter (a forward of the message from the Interia team).

2026
January 8Marcin Motwicki

Responsible disclosure

Public disclosure of the vulnerability details after the fixes were deployed by the Interia team.

Legend:PWNONEInteria TeamCERT Polska

Bibliography

1
RFC 5321 - Simple Mail Transfer Protocol (SMTP)

The SMTP protocol specification defining the Envelope From (MAIL FROM) mechanism used in email routing.

2
RFC 5322 - Internet Message Format

The email message format standard defining the Header From, which is displayed to the end user in the mail client.

3
RFC 7208 - Sender Policy Framework (SPF)

The specification of the SPF mechanism that allows verifying whether a given server is authorized to send mail on behalf of a domain. It defines the limit of 10 DNS lookups.

4
RFC 7489 - Domain-based Message Authentication, Reporting, and Conformance (DMARC)

The specification of the DMARC protocol combining SPF and DKIM with an alignment mechanism that enforces consistency between the domains in the envelope and the message header.

5
CERT Polska - Secure Email

A CERT Polska tool for verifying the email security configuration of Polish domains (SPF, DKIM, DMARC).

6
Interia.pl - Mail

One of the largest Polish email services, in which the described SMTP spoofing vulnerability was found.

7
Caniphish.com - How to Spoof an Email Address

A step-by-step guide demonstrating how to identify a vulnerable domain, set up the infrastructure, and successfully spoof an email address, bypassing gaps in protections such as SPF and DMARC.

8
Caniphish.com - Sending Spoofed Emails

A section of the article explaining how cybercriminals bypass SPF protections, exploiting the absence of a strict DMARC policy to successfully forge the email sender.

9
Spookysec Blog - Email Spoofing

A practical guide describing email spoofing techniques and the mechanisms that protect mail against this phenomenon.

Is your domain vulnerable to spoofing?

We run comprehensive email security audits — SPF, DKIM, DMARC, and SMTP server configuration. We’ll check whether anyone can impersonate your organization.

Order an email security audit