Metabase iframe and content security settings

Metabase dashboards can load content from other sites, so the allowed iframe hosts, image sources and embedding origins need deliberate settings. This page explains each control and how to verify it.

On this page

Why Metabase iframe and content security settings need an owner

On a self-hosted Metabase, the settings that decide what dashboards can load and who can frame them are the iframe host list, the image host rules and the authorized embedding origins. Each one is a configuration decision, and none of them is reviewed automatically when someone adds a new dashboard card or publishes an embed. Assign a named owner, usually the platform team with security sign-off, before dashboards go to business users, because a card that pulls in outside content is effectively a third-party page running inside your analytics environment.

Review these settings when you first deploy, when you enable embedding for a new site or customer, when a business team asks for a new media or document source in a dashboard, and after any Metabase upgrade that may change defaults. The open source edition gives you the most important control without a license: MB_ALLOWED_IFRAME_HOSTS limits which hosts dashboard iframe cards can load. The supplied documentation notes that the default list already includes popular hosts such as youtube.com and docs.google.com, so the owner should decide whether those defaults fit your policy or whether the variable should be set to a blank value and rebuilt around an approved list. Guest embedding also works on every plan, including open source, so an owner should confirm which embedding methods are enabled before anyone publishes one.

Before you assign the role, write down three things: the hosts your business users genuinely need, the sites that must never be framed by or frame your instance, and the person who approves exceptions. Confirm the exact behavior of the setting against the environment variables documentation for your Metabase version, and test a card with an unapproved host in a non-production instance. Your security team will ask the same questions during any review of the deployment, so answering them in writing now saves rework later.

Configuration options and when each fits

This table compares the three ways to set MB_ALLOWED_IFRAME_HOSTS: keeping the default list, replacing it with approved hosts, or setting a blank value. Read each row as a decision: the use case, the risk it carries and what to confirm with the people who own the dashboards before you change the setting.

OptionUse caseRiskConfirm with dashboard owners
Keep the default listDashboards that already embed content from the hosts on the default list, such as video or shared documentsViewers can load content from any host on the list, and the list includes popular sites that owners may not have reviewed for your policyWhich hosts their cards embed today and whether each one is approved by your security and content policies
Custom list of approved hostsDashboards that need a few known internal or vendor hosts, with everything else blockedMissing a host breaks cards silently for viewers, and a broad entry such as a shared hosting domain can widen what is allowedExact host names needed, whether they use subdomains, and who approves additions and removals
Blank value (default list disabled)Strict environments where no iframe content should load in dashboard cards unless explicitly allowedAny dashboard that depends on an embedded video or document will stop displaying that contentWhether any existing cards rely on iframes and how to replace or remove them before the change
Image hostsDashboards or text cards that show images from external URLsExternal image loads can reveal viewer IP addresses to third parties and can carry unreviewed contentWhich image sources are used and whether they can be hosted internally instead
Authorized embedding originsSites outside your Metabase instance that embed dashboards or questionsAn origin left open can let unexpected sites display Metabase contentWhich websites embed Metabase, their exact origins and who owns each embedding page

How a dashboard card request is checked

The flow starts when a user opens a dashboard that contains an iframe card. Metabase reads the card's host and compares it against the allowed list set through MB_ALLOWED_IFRAME_HOSTS, which the administrator controls on the server side. Only a host on the list is rendered in the browser, so the browser fetches the external page directly. Check that the admin-maintained list is the only place hosts are added, and that the default entries you keep are ones your organization has accepted.

Metabase checks each iframe card host against an admin-set list before the browser loads it.

Setting and verifying allowed iframe hosts

This sequence turns an informal list of external sites into a reviewed MB_ALLOWED_IFRAME_HOSTS setting, then proves that approved dashboard iframe cards render and unapproved hosts are refused. The result is a documented allowlist that owners have agreed to and that can be audited later.

  1. Inventory external hosts used in dashboards

    Ask each dashboard owner, and check the existing dashboards yourself, for every iframe card that points to an external site. Record the full host name for each one, such as a video site or a shared document service, along with the dashboard, collection and owner. Include cards added by users in the past, since they are easy to miss. The step is done when you have a single table that lists every external host in use and where it appears. Hosts that appear only in a draft or personal collection should still be listed so the owner can decide on them.

  2. Agree the approved host list with owners

    Review the inventory with the dashboard owners and the team that runs Metabase. For each host, decide whether it is approved, must be removed from the dashboard, or needs a business reason and a named owner before approval. Note the reason for every approval so the list can be defended later. Confirm with your security team whether any host should be refused even if owners want it. The output is a signed-off list of hosts with an approver and a reason for each.

  3. Check the default host list

    Metabase ships with a default set of popular hosts, which the environment variables documentation says includes youtube.com and docs.google.com, that it allows in iframe cards unless you change the setting. Compare that default list against your agreed list. Decide whether to keep the defaults, replace them, or disable them. Write down the decision, because the default allows hosts that nobody reviewed in your organization.

  4. Set MB_ALLOWED_IFRAME_HOSTS in deployment configuration

    Set the MB_ALLOWED_IFRAME_HOSTS environment variable in the same place you manage the rest of the Metabase configuration, such as your container definition, systemd unit or Kubernetes manifest. Enter the approved hosts as agreed in the earlier step. If you want no external iframes at all, set the variable to a blank value, which disables the default list. Commit the change to version control so it is reviewed like any other configuration change. The step is done when the value in the deployed configuration matches the signed-off list.

  5. Restart Metabase and confirm the new value

    Restart the Metabase service so it reads the new environment variable, then confirm the running process has the value you deployed. Use the same method your team uses to inspect environment variables on the host or container. Check the Metabase logs for startup errors. The output is a restarted instance whose live configuration matches the committed change. If the value does not match, fix the deployment source before continuing rather than editing the running instance by hand.

  6. Test approved and unapproved iframe cards

    Create or use a test dashboard with one iframe card for an approved host and one for a host that is not on the list. Open the dashboard as a user who can view it and confirm the approved content renders. Confirm the unapproved content does not render. Test the blank-value case separately if you chose it, since the result should be that no external iframe loads. Record the URLs you tested and the observed result for each, then remove the test dashboard or keep it in a restricted collection.

  7. Document the change and set a review point

    Record the final host list, the approvers, the reason for each host, the default-list decision and the date of the change in your change log or configuration documentation. Link the test results to the record. Name the person who reviews the list when a dashboard owner asks for a new host, and agree how requests are submitted. The output is a document that an auditor or new administrator can read to understand why each host is allowed and who approved it.

Security risks of loose iframe and embedding settings

Dashboards can pull in iframes, images and scripts from outside your organization, and embedding settings decide who can frame your content. The risks below share one root cause: a host or origin gets trusted once and then stays trusted without anyone reviewing it.

Clickjacking through permitted hosts

An iframe card can load a page from any host on the allowed list. If an allowed host can be abused to show harmful content or overlay controls, users may act on it while viewing a trusted Metabase dashboard. Review each allowed host for whether it lets third parties publish content or frame other sites. Check that dashboard cards only embed hosts your analysts actually need, and test one allowed host end to end before approving it.

Environment variables docs

Data leaving through external frames

When a dashboard card loads an external page, the visitor's browser sends a request to that host, and the page can read the URL and parameters it was given. Dashboards that filter on customer identifiers or account numbers may put that data into a request to a third party. Confirm which dashboards use iframe cards, which parameters they pass, and whether the hosts receiving them are approved by your data owners.

Third-party scripts with broad reach

An embedded page from an allowed host can run its own scripts inside the dashboard view and may load further resources from other domains. Those scripts can read what the page shows, including data rendered by Metabase. Ask whether each allowed host is a service you would already accept as a subprocessor, and whether it serves scripts you cannot pin or review.

Host lists drifting after changes

A dashboard owner who needs a video or a document can add a host to a card without a security review, and the change persists after the owner leaves. The default allowed list also grows the attack surface if nobody reviews it. Record who owns the allowed host list, how changes are approved, and when the list was last reviewed. Compare the live setting against the approved list on a schedule.

Embedding origins broader than needed

Embedding lets an external site show Metabase content. If the authorized origins list includes wildcard domains or whole partner networks, any page on those origins can display embedded dashboards. Limit each origin to the exact site that needs it, remove origins for retired partners, and confirm with the owning team which origins are still active.

Questions teams ask before changing iframe and embedding settings

What does it cost in effort to change iframe and embedding settings?

The configuration change itself is small: it is one environment variable and a restart of the Metabase process. The effort sits in the review around it. Your security team needs to decide which hosts dashboard cards may load, which image sources are acceptable, and which sites may embed Metabase content. Each approved host adds a line to review, and each embedding origin adds a test that the content renders and that other origins are refused. Costs come from internal review time, from any partner time you buy for testing, and from re-review whenever a new host or embed is requested. Ask any partner for a written scope that lists the hosts, the dashboards and the embedding origins in view, because those three counts drive most of the work.

Can the open source edition set allowed iframe hosts?

Yes. The iframe host list is controlled by the MB_ALLOWED_IFRAME_HOSTS environment variable, which is part of the self-hosted configuration rather than a paid feature. It lists the hosts that dashboard iframe cards may load. By default, the list includes popular hosts such as youtube.com and docs.google.com. Setting the variable to a blank value disables that default list, so only hosts you add are permitted. Confirm the exact syntax for your version in the environment variables documentation before you rely on it, and test the setting in a non-production instance first, since an overly strict list will silently break cards that staff already use.

What does guest embedding require on each plan?

Guest authentication for embedding works on every plan, including the open source edition. The pricing page lists Open Source as free, Starter at $100 per month or $90 per month billed yearly with the first 5 users included, Pro at $575 per month or $517.50 per month billed yearly with the first 10 users included, and Enterprise priced by quote starting at $20,000 per year. Any SSO-based embedding, however, requires Pro or Enterprise. So if your plan is open source or Starter and you want users to reach embedded content through your identity provider, you will need to budget for an upgrade. Confirm the current figures on the pricing page, since plan prices change.

How long does a review take with many hosts and dashboards?

No fixed duration is published for this review, so the answer depends on what you ask for. Duration grows with the number of hosts, because each one needs a justification, an owner and a test of what loads. It also grows with the number of dashboards that contain iframe cards or embeds, because each must be checked for data exposure and for content that changes after approval. Teams that already keep a written list of approved hosts and a named owner for each dashboard usually finish faster. Ask any partner to state the review length in writing against the host and dashboard counts you provide.

What must our team supply before the work starts?

Before work starts, supply the Metabase version and deployment model, the list of dashboards that use iframe cards or embedding, and the candidate host list with a business reason for each. Also supply the domains where Metabase will be embedded, the identity provider in use, and your plan level, since SSO-based embedding depends on it. Name a security approver who can accept or reject hosts, and a test owner who can confirm dashboards after changes. Missing inputs are the most common cause of delay, so write them into the scope before any work begins.

Can we make these changes ourselves?

Yes, in most cases. The configuration change is a documented environment variable, and an internal team with access to the server, the service configuration and a test instance can apply it. What needs more care is deciding which hosts to allow, verifying embeds from each origin and checking that no sensitive data reaches an external site through a card. Internal teams usually handle the change and need a clear approval record. Teams that want an independent check of the settings, or a written test record for an assessor, often bring in a partner for that review. Confirm each step against your own version's documentation before you make changes in production.

Keeping iframe host lists reviewed after go-live

The allowed iframe host list should be treated as a configuration item under change control, not as a setting someone adjusts once during rollout and forgets. The MB_ALLOWED_IFRAME_HOSTS value decides which hosts dashboard iframe cards can load, and the default list includes popular hosts such as youtube.com and docs.google.com. Each of those defaults is a decision your organization has made by accepting it, so review them on the same cadence as other security-relevant configuration. Record the current value in your configuration repository, and require a written change request for every addition or removal. Keep the approver's name, the business reason, the host name and the date in the same record, so an auditor or incident responder can see who allowed a host and why. Confirm with your own team whether a blank value, which disables the default list, is something you want enforced as a standing rule.

Review the list again whenever Metabase is upgraded, because a release can change how embedding, iframe cards, or content loading behave. Treat any upgrade that touches embedding, dashboard cards or content security as a trigger for a retest: load a dashboard with each approved iframe host, confirm that unapproved hosts are blocked, and check that the embedding and sharing paths you rely on still behave as your records say. Read the release notes for each version in the upgrade path before the change window opens, and confirm the exact upgrade steps against the Metabase upgrading documentation. Your patch runbook and your security testing scope should both reference this review, so a security release that carries no embedding changes still produces a short, documented check rather than being skipped.

Connect the host review to the sibling work on patching and security testing without treating either as a substitute. Security advisory tracking tells you when a fix ships, and the iframe review tells you whether your own allowed hosts still match what dashboards need. Ask your penetration tester to include the embedding and iframe paths in scope, and to test whether a dashboard can be pointed at a host outside the list. When a host is removed, check existing dashboards for cards that still reference it, since those cards will stop rendering and users will ask why. Set a named owner for the list, a fixed review date that your change calendar already tracks, and a short exit criterion for any host that no longer has a business reason to appear.

How DeployOpen scopes Metabase content security work

Content security settings touch hosts, embeds and cookies at once, so the work is scoped as one written engagement rather than a series of config changes. Each card below is a stage of that engagement, and together they show what the client receives and what stays in their hands after handover.

Host and origin inventory

The work starts with a written list of every external host Metabase dashboards, cards and embedding pages must load from, such as video providers, document hosts, image CDNs and the sites that will frame Metabase. Each entry is recorded with the business reason it exists and the owner who approved it. Ask for this inventory as a deliverable before any setting changes, because an allowlist that nobody can explain tends to grow unchecked and is hard to review later.

Environment variables docs

Configuration inside your infrastructure

DeployOpen applies the agreed settings to the Metabase instance in your own cloud accounts, data centers or air-gapped network, using your change process and your secrets handling. The settings are kept in version-controlled configuration where your deployment allows it, so each change has an author, a reason and a rollback path. Confirm with your team which environment variables your deployment method reads and how they are restarted.

Verification testing of the settings

After configuration, the team checks that approved hosts load in dashboard iframe cards, that unapproved hosts are blocked, and that embedding origins behave as intended from a browser outside the allowed list. Cookie behavior is checked in the browsers and embedding contexts your users actually use. Results are recorded per test case so a retest after the next upgrade compares like with like.

Handover documentation

The handover package describes the approved host list, the reason for each entry, the settings that control framing and embedding, the test cases and their results, and the steps for adding a new host through a review. Your security and compliance teams can use it as evidence of configuration decisions. DeployOpen prepares this material. Independent auditors decide whether it meets any framework you are assessed against.

Optional retainer for ongoing review

Dashboards change, new vendors appear and Metabase releases can alter defaults, so the allowlist drifts over time. A retainer can cover periodic review of the host inventory, retesting after upgrades and changes to embedding setups. Ask in the quote which review cadence, change requests and retest steps are included, and which are billed separately.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.