The comments seem fixated on the interpretation that you are asking about computer viruses in general. However, I'm assuming you're asking about how to construct a plausible virus that is spread by physical proximity, in contrast to most modern computer viruses, which spread through network proximity, the nodes of which can be physically very distant.
Computer malware is built to exploit what is available, rather than what is preferable. If your synthetic citizens make use of something like modern Near Field Communication, perhaps there's some vulnerability in the standardized software protocols or common hardware used to enable that technology.
For instance, maybe your synthetic actors use NFC as a form of proof of identity, like a literal manifestation of modern cryptographic handshakes that allow two parties to trust each other. This might be done over NFC for added security or perhaps for some kind of cultural reason. But, if that tech is compromised by a worm that lies in wait until the infected person "handshakes" with someone else, it could spread like biological diseases.
NFC uses radio waves but you could adapt this idea for faster/denser forms of communication, as well. For instance, a visible light or IR-based communication method would require that the transmitter and receiver have line-of-sight to each other, which could be spun to generally require physical proximity for some kind of convenience.
Alternatively, you could use something like a QR code. Maybe your synthetic citizens all have high-speed, "subconscious" barcode readers built into their visual sensors that allow them to rapidly decode barcode-encoded data as they walk past it. For instance, if your society grew to use them pervasively for things like advertising or street signs. But there could be a vulnerability in the decoding software that allows arbitrary code to be run or a more convoluted attack that exploits the auto-execution functions of these high-speed readers to direct the victim's networking software to download a malicious file without permission. It could also spread like a worm, instructing the victim to brand themselves with the malicious QR code or paste it onto physical objects.
I think both approaches are rich in narrative possibilities. The former example has obvious parallels to human handshakes and physical interactions that could be an interesting exploration in a society filled with synthetic intelligences. The latter is evocative of sci-fi horror "viruses" like Dead Space's Markers, which self-propagate to terrifying effect.