HogVul: Black-box Adversarial Code Generation Framework Against LM-based Vulnerability Detectors

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Jingxiao, He, Ping, Du, Tianyu, Bing, Sun, Zhang, Xuhong
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918279159742464
author Yang, Jingxiao
He, Ping
Du, Tianyu
Bing, Sun
Zhang, Xuhong
author_facet Yang, Jingxiao
He, Ping
Du, Tianyu
Bing, Sun
Zhang, Xuhong
contents Recent advances in software vulnerability detection have been driven by Language Model (LM)-based approaches. However, these models remain vulnerable to adversarial attacks that exploit lexical and syntax perturbations, allowing critical flaws to evade detection. Existing black-box attacks on LM-based vulnerability detectors primarily rely on isolated perturbation strategies, limiting their ability to efficiently explore the adversarial code space for optimal perturbations. To bridge this gap, we propose HogVul, a black-box adversarial code generation framework that integrates both lexical and syntax perturbations under a unified dual-channel optimization strategy driven by Particle Swarm Optimization (PSO). By systematically coordinating two-level perturbations, HogVul effectively expands the search space for adversarial examples, enhancing the attack efficacy. Extensive experiments on four benchmark datasets demonstrate that HogVul achieves an average attack success rate improvement of 26.05\% over state-of-the-art baseline methods. These findings highlight the potential of hybrid optimization strategies in exposing model vulnerabilities.
format Preprint
id arxiv_https___arxiv_org_abs_2601_05587
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle HogVul: Black-box Adversarial Code Generation Framework Against LM-based Vulnerability Detectors
Yang, Jingxiao
He, Ping
Du, Tianyu
Bing, Sun
Zhang, Xuhong
Cryptography and Security
Artificial Intelligence
Recent advances in software vulnerability detection have been driven by Language Model (LM)-based approaches. However, these models remain vulnerable to adversarial attacks that exploit lexical and syntax perturbations, allowing critical flaws to evade detection. Existing black-box attacks on LM-based vulnerability detectors primarily rely on isolated perturbation strategies, limiting their ability to efficiently explore the adversarial code space for optimal perturbations. To bridge this gap, we propose HogVul, a black-box adversarial code generation framework that integrates both lexical and syntax perturbations under a unified dual-channel optimization strategy driven by Particle Swarm Optimization (PSO). By systematically coordinating two-level perturbations, HogVul effectively expands the search space for adversarial examples, enhancing the attack efficacy. Extensive experiments on four benchmark datasets demonstrate that HogVul achieves an average attack success rate improvement of 26.05\% over state-of-the-art baseline methods. These findings highlight the potential of hybrid optimization strategies in exposing model vulnerabilities.
title HogVul: Black-box Adversarial Code Generation Framework Against LM-based Vulnerability Detectors
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2601.05587