jitsi-meet: Prosody/Jigasi missing header whitelist in mod_filter_iq_rayo allows arbitrary SIP header injection and Caller ID spoofing
The Prosody filter for Rayo dial requests only removed a few named internal headers and passed every other client-supplied header through to Jigasi, which copied them into outbound SIP INVITE messages. An authenticated user allowed to make outbound calls could therefore add arbitrary SIP headers, including identity headers, and spoof the caller ID on calls where Jigasi is a trusted SIP peer.
- Triaged in 3 hours
- Fixed in 5 days
- Paid in 5 days
- Disclosed after 24 days
Summary by the program
Jitsi Meet's Prosody and Jigasi components contained a SIP header injection vulnerability in the interaction between mod_filter_iq_rayo.lua and the call handling backend. The Prosody filter implemented an incomplete blocklist that stripped only three specific internal header names (X-outbound-call-initiator-user, X-outbound-call-initiator-group, and JvbRoomName on visitor nodes) from client-supplied Rayo <dial> IQ stanzas, but forwarded all other arbitrary headers unfiltered to Jigasi. Jigasi's CallControl.java consumed these headers without validation and stored them in an extraHeaders map. SipGatewaySession.java then injected every entry directly into outbound SIP INVITE requests as raw protocol-level headers. This allowed authenticated users with outbound-call privileges to inject arbitrary SIP headers such as P-Asserted-Identity and Remote-Party-ID, enabling Caller ID spoofing on outgoing SIP calls in environments where Jigasi operates as a trusted SIP peer.
Changes:
- fix(security): Implement whitelist for Rayo dial headers
We thank @pmgjoe for submitting this report to us.
Context
Jitsi Meet is a video conferencing stack. Two of its components are relevant here: Prosody, the XMPP server that handles signalling, and Jigasi, the gateway that bridges Jitsi conferences to SIP. When a client wants to place an outbound SIP call, it sends a Rayo <dial> IQ stanza through Prosody. A Prosody module, mod_filter_iq_rayo.lua, sits in front of that path and is supposed to sanitise the headers the client attaches to the dial request before they are forwarded to Jigasi.
Jigasi receives those headers in CallControl.java, keeps them in an extraHeaders map, and SipGatewaySession.java later writes each entry into the outbound SIP INVITE as a raw protocol header. In other words, whatever survives the Prosody filter ends up as a real SIP header on the wire.
The vulnerability is that the filter was a blocklist rather than a whitelist, and the blocklist was far too short.
Setup
The precondition is an authenticated Jitsi user who holds outbound-call privileges, in a deployment where Jigasi acts as a trusted SIP peer. The report does not describe specific versions, test accounts or tooling beyond the code paths involved.
Finding it
The researcher looked at mod_filter_iq_rayo.lua and found that it stripped only three specific internal header names from client-supplied Rayo <dial> IQ stanzas:
X-outbound-call-initiator-userX-outbound-call-initiator-groupJvbRoomName(on visitor nodes)
Every other header the client attached was forwarded to Jigasi unfiltered. Following the data flow, CallControl.java consumed those headers without validation and stored them in an extraHeaders map, and SipGatewaySession.java injected every entry directly into outbound SIP INVITE requests as raw protocol-level headers. A blocklist of three names against an open-ended header namespace is the wrong shape of control: anything not on the list passes, including headers that carry identity semantics in SIP.
Exploitation
Step 1: Authenticate with outbound-call privileges
The attacker needs a valid account on the Jitsi deployment and the right to place outbound calls through Jigasi. The report does not give the request used to obtain or exercise those privileges.
Step 2: Send a Rayo dial IQ with arbitrary headers
The client submits a Rayo <dial> IQ stanza whose headers include names outside the three-name blocklist. Because the Prosody filter only removes X-outbound-call-initiator-user, X-outbound-call-initiator-group and JvbRoomName (the last on visitor nodes), the extra headers pass through untouched. The report does not include the literal stanza.
Step 3: Headers reach Jigasi unvalidated
CallControl.java takes the forwarded headers and places them in the extraHeaders map without checking their names or values.
Step 4: Headers become SIP INVITE headers
SipGatewaySession.java iterates the map and writes each entry into the outbound SIP INVITE as a raw header. The injected names are now part of the SIP message itself, not application metadata.
Step 5: Spoof the caller identity
Among the headers an attacker can inject are P-Asserted-Identity and Remote-Party-ID. Both are SIP headers that downstream equipment may use to determine who is calling. In an environment where Jigasi is a trusted SIP peer, the receiving side may accept these values, so the attacker controls the Caller ID presented on the outgoing call.
Root cause
The filter in mod_filter_iq_rayo.lua implemented an incomplete blocklist. It removed three known internal header names and forwarded everything else to Jigasi. Jigasi then performed no validation of its own: CallControl.java stored the headers in extraHeaders, and SipGatewaySession.java serialised them straight into the SIP INVITE. There was no second line of defence at the trust boundary between the XMPP signalling layer and the SIP gateway, so any header name the blocklist did not anticipate became a protocol-level SIP header.
Impact
An authenticated user with outbound-call privileges can inject arbitrary SIP headers into outbound INVITE requests. By injecting P-Asserted-Identity and Remote-Party-ID, the attacker can spoof the Caller ID on outgoing SIP calls. The report hedges this on the deployment: the spoofing works in environments where Jigasi operates as a trusted SIP peer. The program rated the issue low severity and awarded a 100.00 USD bounty.
Fix
The fix was to replace the blocklist with a whitelist for Rayo dial headers, proposed as "fix(security): Implement whitelist for Rayo dial headers" in https://github.com/jitsi/jitsi-meet/pull/17480. With a whitelist, only known-safe header names are forwarded to Jigasi, and anything else is dropped before it can reach extraHeaders and the SIP INVITE.
Variants to test
- Other blocklist-based filters on the same path. Look for any other module that strips a fixed set of names from client input before forwarding to a backend. A positive result is a header name outside the list that the backend treats as meaningful.
- Identity headers in other protocols. Where a gateway translates between two protocols, try headers that carry identity or routing semantics in the target protocol (
P-Asserted-Identity,Remote-Party-IDhere). A positive result is the header appearing verbatim in the outbound message. - Header name normalisation. Try case variations and unusual spellings of the blocked names to see whether the filter matches exactly. A positive result is a blocked name reaching the backend in a form the filter did not catch.
- Visitor-node scope. The
JvbRoomNameentry applies only on visitor nodes; check whether the same header passes on other node types. A positive result is the header surviving on a path where the filter does not apply.
Hunting notes
This class of bug hides at translation boundaries: an XMPP module forwarding to a SIP gateway, an API gateway forwarding to an internal service, a proxy rewriting headers. During recon, look for code that removes a small, named set of headers rather than allowing a known set, especially where the downstream component writes the values into a protocol message. The signal is a filter whose logic is "strip these three things" next to a consumer that accepts arbitrary keys.
To show impact, follow the value all the way to the wire: identify the exact sink (here SipGatewaySession.java writing into the INVITE), name the headers that change trust decisions downstream, and state the deployment condition under which they are honoured. The report tied the injection to Caller ID spoofing via P-Asserted-Identity and Remote-Party-ID and noted the trusted-SIP-peer requirement, which is what made the finding concrete enough to accept.
What happened, in plain words
Jitsi Meet is a video conferencing system: you open a web page, join a room, and talk to people over video and audio. Behind the scenes it is made of several programs that talk to each other. Two of them matter here.
- Prosody is the part that handles the signalling, meaning all the messages that set up and manage a call (who is in the room, who wants to call whom). It speaks a protocol called XMPP, which is a text-based messaging protocol for servers and clients.
- Jigasi is a gateway: a bridge between the Jitsi world and the ordinary telephone world. The telephone world uses a protocol called SIP, which is how internet phone calls are set up. Jigasi translates between the two.
When a Jitsi user wants to call a normal phone number, their client sends a request through Prosody asking Jigasi to dial out. That request is called a Rayo <dial> IQ stanza. "Rayo" is the name of the XMPP extension used for controlling calls, and a "stanza" is just an XMPP message. Attached to that request are headers: small name-and-value pairs, like labels on a parcel, that carry extra information.
A small piece of code inside Prosody, a module called mod_filter_iq_rayo.lua, sits in front of that path. Its job is to clean up the headers before they are passed on to Jigasi. The problem was that it only removed three specific header names and let everything else through. Jigasi then took whatever arrived and copied it straight into the outgoing phone call. That meant a logged-in user could slip in headers that the phone network treats as "this is who is calling", and pretend to be somebody else.
This is a header injection bug: untrusted input ends up inside a message that another system trusts. The program rated it low severity and paid a 100.00 USD bounty.
Context
Let us unpack the pieces one at a time.
Jitsi Meet is the video conferencing stack. A stack here means a set of programs that work together, each doing one job.
Prosody is the XMPP server. An XMPP server is like a post office for the signalling messages: clients connect to it, and it routes messages between them. Signalling is everything that is not the actual audio or video: ringing, connecting, telling the other side who you are, and so on.
Jigasi is the gateway that bridges Jitsi conferences to SIP. A gateway is a translator: it takes messages in one format and re-sends them in another. SIP is the standard protocol for setting up internet telephone calls. When you call a normal phone from a video app, something has to speak SIP on your behalf, and that is Jigasi.
When a client wants to place an outbound SIP call, it sends a Rayo <dial> IQ stanza through Prosody. Think of a stanza as an envelope with a form inside: the envelope says what kind of request it is ("dial this number"), and the form carries the details, including the headers. IQ is the XMPP name for a request-and-response exchange, like asking a question and waiting for an answer.
The Prosody module mod_filter_iq_rayo.lua sits in front of that path. A module is a plug-in: a piece of code that the server loads to add behaviour. This module is supposed to sanitise the headers, meaning clean them up and remove anything dangerous, before they are forwarded to Jigasi.
Jigasi receives those headers in a file called CallControl.java, keeps them in an extraHeaders map, and SipGatewaySession.java later writes each entry into the outbound SIP INVITE as a raw protocol header. A map is a simple lookup table: a list of names, each with a value. An INVITE is the SIP message that says "I want to start a call with you". "Raw protocol header" means the value is written directly into the message itself, as if it had been put there by the phone system, not as a note attached on the side.
In other words, whatever survives the Prosody filter ends up as a real SIP header on the wire. "On the wire" means in the actual network traffic that leaves the server.
The vulnerability is that the filter was a blocklist rather than a whitelist, and the blocklist was far too short.
- A blocklist (also called a denylist) says: everything is allowed except these named things.
- A whitelist (also called an allowlist) says: everything is forbidden except these named things.
A blocklist only works if you can think of every bad thing in advance. A whitelist only works if you can list every good thing, but it fails safe: anything you forgot is refused rather than accepted. Here the blocklist named three headers, and the world of possible header names is open-ended, so anything not on the list sailed through.
Setup
The precondition is an authenticated Jitsi user who holds outbound-call privileges, in a deployment where Jigasi acts as a trusted SIP peer.
- Authenticated means logged in with a valid account.
- Outbound-call privileges means the account is allowed to make calls out to the phone network. Not every user is.
- A deployment is one installation of the software, for example one company's own Jitsi server.
- A trusted SIP peer is a phone-system component that the receiving side believes. If the phone network treats Jigasi as a trusted source, it tends to believe what Jigasi says, including who the caller is.
The report does not describe specific versions, test accounts or tooling beyond the code paths involved.
Finding it
The researcher looked at mod_filter_iq_rayo.lua and found that it stripped only three specific internal header names from client-supplied Rayo <dial> IQ stanzas:
X-outbound-call-initiator-userX-outbound-call-initiator-groupJvbRoomName(on visitor nodes)
These three names are internal: they are used by Jitsi itself to carry information between its own parts, and a client should not be able to set them. "Visitor nodes" refers to a particular kind of Jitsi server node; the report only says that the JvbRoomName entry applies there.
Every other header the client attached was forwarded to Jigasi unfiltered. Following the data flow, CallControl.java consumed those headers without validation and stored them in an extraHeaders map, and SipGatewaySession.java injected every entry directly into outbound SIP INVITE requests as raw protocol-level headers.
"Data flow" means the journey a value takes through the code, from where it enters to where it is used. "Validation" means checking that a value is what it claims to be, for example that a header name is one the system expects. "Injected" means placed into a message by code that did not create the message's structure itself.
A blocklist of three names against an open-ended header namespace is the wrong shape of control: anything not on the list passes, including headers that carry identity semantics in SIP. "Identity semantics" means the header's meaning is "who is this person", so getting it wrong changes who the call appears to come from.
Exploitation
Step 1: Authenticate with outbound-call privileges
The attacker needs a valid account on the Jitsi deployment and the right to place outbound calls through Jigasi. The report does not give the request used to obtain or exercise those privileges.
Why this step: the whole path only exists for users who are allowed to dial out. Without that permission there is no <dial> request to tamper with.
Step 2: Send a Rayo dial IQ with arbitrary headers
The client submits a Rayo <dial> IQ stanza whose headers include names outside the three-name blocklist. Because the Prosody filter only removes X-outbound-call-initiator-user, X-outbound-call-initiator-group and JvbRoomName (the last on visitor nodes), the extra headers pass through untouched. The report does not include the literal stanza.
Why this step: this is where the attacker's input enters the system. The filter is the only checkpoint on this path, and it checks for the wrong thing: it looks for three known-bad names instead of allowing only known-good ones.
Step 3: Headers reach Jigasi unvalidated
CallControl.java takes the forwarded headers and places them in the extraHeaders map without checking their names or values.
Why this matters: this is the second chance to catch the problem, and it is missed. A second line of defence means a check further down the chain that still stops the attack if the first check fails. Here there was none.
Step 4: Headers become SIP INVITE headers
SipGatewaySession.java iterates the map and writes each entry into the outbound SIP INVITE as a raw header. The injected names are now part of the SIP message itself, not application metadata.
"Iterates" means goes through the map entry by entry. "Application metadata" means extra information attached alongside a message for the application's own use, which the receiving phone system would ignore. Once the value is a raw SIP header, the phone system reads it as part of the call setup itself.
Step 5: Spoof the caller identity
Among the headers an attacker can inject are P-Asserted-Identity and Remote-Party-ID. Both are SIP headers that downstream equipment may use to determine who is calling. In an environment where Jigasi is a trusted SIP peer, the receiving side may accept these values, so the attacker controls the Caller ID presented on the outgoing call.
- Caller ID is the phone number or name shown to the person receiving a call.
- Spoofing means pretending to be someone else.
- Downstream equipment means the phone systems further along the path, after Jigasi.
Why this is the payoff: the attacker does not just add noise to a message. They change a value that other systems use to decide who is calling, which is exactly the kind of thing people rely on when they decide whether to answer.
Root cause
The filter in mod_filter_iq_rayo.lua implemented an incomplete blocklist. It removed three known internal header names and forwarded everything else to Jigasi. Jigasi then performed no validation of its own: CallControl.java stored the headers in extraHeaders, and SipGatewaySession.java serialised them straight into the SIP INVITE. There was no second line of defence at the trust boundary between the XMPP signalling layer and the SIP gateway, so any header name the blocklist did not anticipate became a protocol-level SIP header.
"Serialised" means turned into the exact text form that goes on the network. A trust boundary is a point where data moves from one system, or one level of trust, to another. Data crossing a trust boundary should be checked, because the receiving side assumes the sender already did.
A simple comparison: a nightclub bouncer with a list of three banned people will let in anyone else, however suspicious. A bouncer with a guest list lets in only the people on it. The first approach only works if you already know every troublemaker by name.
Impact
An authenticated user with outbound-call privileges can inject arbitrary SIP headers into outbound INVITE requests. By injecting P-Asserted-Identity and Remote-Party-ID, the attacker can spoof the Caller ID on outgoing SIP calls. The report hedges this on the deployment: the spoofing works in environments where Jigasi operates as a trusted SIP peer. The program rated the issue low severity and awarded a 100.00 USD bounty.
"Arbitrary" means any header name the attacker chooses, not just the two named here. The two named ones are examples that matter because of what they mean to the phone network.
Fix
The fix was to replace the blocklist with a whitelist for Rayo dial headers, proposed as "fix(security): Implement whitelist for Rayo dial headers" in https://github.com/jitsi/jitsi-meet/pull/17480. With a whitelist, only known-safe header names are forwarded to Jigasi, and anything else is dropped before it can reach extraHeaders and the SIP INVITE.
A pull request (PR) is a proposed change to a code repository, which other people review before it is merged, meaning accepted into the main code. The link above is the proposed change addressing this issue.
Why a whitelist fixes it: the set of headers that Jitsi legitimately needs to pass along is small and known. Listing those and refusing everything else means a header name nobody thought of is refused by default, rather than accepted by default.
Variants to test
- Other blocklist-based filters on the same path. Look for any other module that strips a fixed set of names from client input before forwarding to a backend. A positive result is a header name outside the list that the backend treats as meaningful.
- Identity headers in other protocols. Where a gateway translates between two protocols, try headers that carry identity or routing semantics in the target protocol (
P-Asserted-Identity,Remote-Party-IDhere). A positive result is the header appearing verbatim in the outbound message. - Header name normalisation. Try case variations and unusual spellings of the blocked names to see whether the filter matches exactly. A positive result is a blocked name reaching the backend in a form the filter did not catch.
- Visitor-node scope. The
JvbRoomNameentry applies only on visitor nodes; check whether the same header passes on other node types. A positive result is the header surviving on a path where the filter does not apply.
"Normalisation" means the process of turning different spellings of the same thing into one standard form. If a filter compares names exactly but the receiving system ignores case, then JvbRoomName and jvbroomname might be treated as the same header by one side and as different by the other. "Verbatim" means exactly as written, character for character.
Hunting notes
This class of bug hides at translation boundaries: an XMPP module forwarding to a SIP gateway, an API gateway forwarding to an internal service, a proxy rewriting headers.
- An API (application programming interface) is a defined way for one program to ask another program to do something. An API gateway is the front door that receives those requests and passes them on to the services behind it.
- A proxy is a program that sits in the middle of a connection and forwards traffic, sometimes changing it on the way.
During recon, look for code that removes a small, named set of headers rather than allowing a known set, especially where the downstream component writes the values into a protocol message. Recon (reconnaissance) means the early phase of looking around a system to understand how it is built. The signal is a filter whose logic is "strip these three things" next to a consumer that accepts arbitrary keys.
To show impact, follow the value all the way to the wire: identify the exact sink (here SipGatewaySession.java writing into the INVITE), name the headers that change trust decisions downstream, and state the deployment condition under which they are honoured. A sink is the place in the code where a value finally gets used in a way that matters. "Honoured" means the receiving system actually acts on the value instead of ignoring it. The report tied the injection to Caller ID spoofing via P-Asserted-Identity and Remote-Party-ID and noted the trusted-SIP-peer requirement, which is what made the finding concrete enough to accept.
Glossary
- API (application programming interface): a defined way for one program to ask another program to do something.
- API gateway: the front door that receives API requests and passes them to the services behind it.
- Authenticated: logged in with a valid account.
- Blocklist (denylist): a rule that allows everything except a named set of things.
- Caller ID: the number or name shown to the person receiving a call.
- Data flow: the journey a value takes through code, from where it enters to where it is used.
- Deployment: one installation of a piece of software, for example one company's own server.
- Downstream: further along the path, after the component being discussed.
- Gateway: a component that translates between two systems or protocols.
- Header: a name-and-value pair attached to a message, carrying extra information.
- Header injection: getting untrusted input into a message that another system trusts.
- Identity semantics: the meaning of a value is "who this person is".
- INVITE: the SIP message that asks to start a call.
- IQ: the XMPP name for a request-and-response exchange.
- Iterate: go through a collection entry by entry.
- Jigasi: the Jitsi component that bridges conferences to SIP.
- Jitsi Meet: a video conferencing stack.
- Map: a lookup table of names, each with a value.
- Module: a piece of code a server loads to add behaviour.
- Normalisation: turning different spellings of the same thing into one standard form.
- Outbound-call privileges: permission on an account to place calls out to the phone network.
- Prosody: the XMPP server used by Jitsi for signalling.
- Protocol: an agreed set of rules for how two systems exchange messages.
- Proxy: a program in the middle of a connection that forwards traffic, sometimes changing it.
- Pull request (PR): a proposed change to a code repository, reviewed before being merged.
- Rayo: the XMPP extension used for controlling calls.
- Recon (reconnaissance): the early phase of looking around a system to understand how it is built.
- Sanitise: clean up input by removing anything dangerous.
- Second line of defence: a check further down the chain that still stops an attack if the first check fails.
- Serialise: turn a value into the exact text form that goes on the network.
- Signalling: the messages that set up and manage a call, as opposed to the audio and video itself.
- Sink: the place in code where a value is finally used in a way that matters.
- SIP: the standard protocol for setting up internet telephone calls.
- Spoofing: pretending to be someone else.
- Stanza: an XMPP message.
- Trust boundary: a point where data moves between systems or levels of trust, and should be checked.
- Trusted SIP peer: a phone-system component that the receiving side believes.
- Validation: checking that a value is what it claims to be.
- Verbatim: exactly as written, character for character.
- Visitor node: a particular kind of Jitsi server node; the report only says the
JvbRoomNameentry applies there. - Whitelist (allowlist): a rule that forbids everything except a named set of things.
- XMPP: a text-based messaging protocol used by servers and clients.