An extended public key, usually written as a string starting "xpub" on Bitcoin, is the public half of a BIP-32 key pair. It combines a public key with a chain code, which lets software derive the public keys and addresses of every non-hardened child in a hierarchical deterministic wallet without knowing any private key. It is generated from the matching extended private key (xprv).
Because it cannot sign transactions, an xpub is used to run watch-only wallets and to let merchants and self-hosted payment processors produce a fresh address for each invoice while keys stay offline, for example on a hardware wallet. Anyone holding it can see every past and future address in the account and the balances on them, a serious loss of privacy. And if an attacker also learns a single non-hardened child private key, the xpub lets them work out the parent private key, which is why hardened derivation is used at the account level.
Ref 1070001169