A Hybrid RNN-LSTM Framework for Cyber Threat Detection Using Vulnerability Code Snippets

Authors

  • Akshay R. Jain Department of Computer Science and Engineering, Oriental University, Indore (M.P.), India
  • Atul Agrawal Department of Computer Science and Engineering, Oriental University, Indore (M.P.), India

DOI:

https://doi.org/10.70917/ijcisim-2026-5103

Keywords:

Cyber threat detection, vulnerability classification, RNN-BiLSTM hybrid model, machine learning for security, software vulnerabilities, proactive cyber defense

Abstract

The exponential growth of cyber threats and software flaws, automated detection approaches that can recognize malicious code patterns in dynamic environments are required. Signature based and primitive machine learning theory inability to generalize when presented with new or unseen vulnerabilities is reflected in the limitations of conventional approach. In this work, we introduced a novel deep learning (DL)-based approach using hybrid model of Recurrent Neural Network (RNN) and Bidrectional Long Short-Term Memory (BiLSTM) for the automated vulnerability detection in source code. The model has been evaluated over the available publicly labeled Vulnerability Fix Dataset with 35000 pieces of code snippets. Data preprocessing such as duplicate elimination, tokenization, padding, feature engineering, and label encoding was conducted to ensure high-quality structured inputs. The architecture contains an embedding layer, a RNN baseline layer for learning initial sentence representation, stacked BiLSTM layers for bidirectional context representation and dropout regularization to prevent overfitting. Adam optimization was applied for training the model with categorical cross-entropy loss and label smoothing to provide better generalization. The results of our experiments showed strong performance with 95.31% classification accuracy, 95.0% precision, 94.12% recall and an F1-score of 95.25% were achieved. Receiver Operating Characteristic analysis shows an Area Under the Curve (AUC) of 0.95, suggestive of strong discrimination performance. The confusion matrix provides support by showing how the vulnerability classes such as SQL Injection and Path Traversal are correctly identified. The results indicate that the hybrid RNN–BiLSTM architecture can be used to efficiently perform proactive vulnerability detection. The model is also applicable to enable real-time cybersecurity monitoring and the use of automatically possible counter efforts in contemporary software systems.

Downloads

Download data is not yet available.

Downloads

Published

2026-08-24

How to Cite

Akshay R. Jain, & Atul Agrawal. (2026). A Hybrid RNN-LSTM Framework for Cyber Threat Detection Using Vulnerability Code Snippets. International Journal of Computer Information Systems and Industrial Management Applications, 18(19s), 1096–1106. https://doi.org/10.70917/ijcisim-2026-5103

Issue

Section

Original Articles