This paper introduces a novel spectral anomaly detection method by developing a graph-based filtering framework. In particular, we consider the problem of unsupervised data anomaly detection over wireless sensor networks (WSNs) where sensor measurements are represented as signals on a graph. In our framework, graphs are chosen to capture useful proximity information about measured data. The associated graph-based filters are then employed to project the graph signals on normal and anomaly subspaces, and resulting projections are used in detection of data anomalies. The proposed approach has two main advantages over the standard spectral technique, principal component analysis (PCA). Firstly, graph-based filtering allows us to incorporate structural information known a priori (e.g., distance between sensors) in addition to data. Secondly, it provides localized transformations leading to effective distributed anomaly detection. Our experimental results show that our proposed solution outperforms PCA-based and distributed clustering-based anomaly detection methods in terms of receiver operating characteristics (ROCs).